tests: Change executable names

Make them end with .run so my .gitignore will pick them up.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Anna Schumaker 2014-03-02 17:17:27 -05:00 committed by Anna Schumaker
parent 336024bae9
commit c263e0e524
3 changed files with 8 additions and 18 deletions

View File

@ -5,7 +5,7 @@
function test_file function test_file
{ {
test_equal "./src/file $1" "$2" test_equal "./src/file.run $1" "$2"
} }
@ -91,7 +91,7 @@ echo
new_test "File IO Test" new_test "File IO Test"
# Write to file # Write to file
./src/file -D -w file.txt "$data" ./src/file.run -D -w file.txt "$data"
start_test start_test
assert_equal "$(cat $DATA_DIR/file.txt)" "0 assert_equal "$(cat $DATA_DIR/file.txt)" "0
$data" $data"
@ -104,7 +104,7 @@ PQRST
UVWXYZ" UVWXYZ"
# Write different data to file # Write different data to file
./src/file -D -w file.txt " $data" ./src/file.run -D -w file.txt " $data"
start_test start_test
assert_equal "$(cat $DATA_DIR/file.txt)" "0 assert_equal "$(cat $DATA_DIR/file.txt)" "0
$data" $data"

View File

@ -3,8 +3,8 @@ Import("env", "lib")
build = [] build = []
for f in Glob("*.cpp"): for f in Glob("*.cpp"):
src = str(f) src = str(f)
name = src.split(".")[0] run = src.split(".")[0] + ".run"
build += [ env.Program(name, [src] + lib) ] build += [ env.Program(run, [src] + lib) ]
Return("build") Return("build")

View File

@ -10,15 +10,5 @@ version=$(config_version)
# Run test # Run test
out=$(./src/version) echo -n "Version test ... "
assert_equal "$(./src/version.run)" "$version"
# Analyze result
[ "$version" == "$out" ] && test_success
function on_failed
{
echo " Expected version: $version"
echo " Actual version: $out"
}
test_failed