test_unit no longer needs to see itself
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 17 May 2002 06:29:22 +0000 (06:29 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 17 May 2002 06:29:22 +0000 (06:29 +0000)
src/test_unit/main.c
src/test_unit/metadata.c
src/test_unit/metadata.h
test/test_unit.sh

index dae77a2..56b8840 100644 (file)
@@ -26,7 +26,7 @@ int main(int argc, char *argv[])
        if(0 != test_bitbuffer())
                return 1;
 
-       if(0 != test_metadata(argv[0]))
+       if(0 != test_metadata())
                return 1;
 
        return 0;
index 4c66f27..e49723a 100644 (file)
 #include <stdio.h>
 
 extern int test_metadata_object();
-extern int test_metadata_file_manipulation(const char *progname);
+extern int test_metadata_file_manipulation();
 
-int test_metadata(const char *progname)
+int test_metadata()
 {
        if(0 != test_metadata_object())
                return 1;
 
-       if(0 != test_metadata_file_manipulation(progname))
+       if(0 != test_metadata_file_manipulation())
                return 1;
 
        printf("\nPASSED!\n");
index 0d99c25..11bc964 100644 (file)
@@ -19,6 +19,6 @@
 #ifndef FLAC__TEST_UNIT_METADATA_H
 #define FLAC__TEST_UNIT_METADATA_H
 
-int test_metadata(const char *progname);
+int test_metadata();
 
 #endif
index 5f8f938..e0f198c 100755 (executable)
 LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
 PATH=../src/test_unit:../obj/bin:$PATH
+export PATH
 
-# We use the whole path to test_unit so it can find itself.  It uses it's own
-# binary as a dummy source for creating a test FLAC file so it can work on the
-# metadata.
-if `which test_unit` ; then : ; else
+if test_unit ; then : ; else
        echo "ERROR during test_unit" 1>&2
        exit 1
 fi