test-fileutils.c 453 B

12345678910111213141516
  1. #include "fileutils.h"
  2. #include "util/tester.h"
  3. #include <stdio.h>
  4. int
  5. main ( int argc, char * argv[] )
  6. {
  7. (void)argc;
  8. puts("Starting fileutils tests:");
  9. SEx_TestBool( "FU_FileExists 1", FU_FileExists(argv[0]), true );
  10. SEx_TestBool( "FU_FileExists 2", FU_FileExists("thisfiledoesntexist"), false );
  11. SEx_TestBool( "FU_FiliSize 1", FU_FileSize(argv[0]) > 0, true );
  12. SEx_TestBool( "FU_FiliSize 2", FU_FileSize("thisfiledoesntexist") == 0, true );
  13. }