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:
parent
336024bae9
commit
c263e0e524
|
@ -5,7 +5,7 @@
|
|||
|
||||
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"
|
||||
|
||||
# Write to file
|
||||
./src/file -D -w file.txt "$data"
|
||||
./src/file.run -D -w file.txt "$data"
|
||||
start_test
|
||||
assert_equal "$(cat $DATA_DIR/file.txt)" "0
|
||||
$data"
|
||||
|
@ -104,7 +104,7 @@ PQRST
|
|||
UVWXYZ"
|
||||
|
||||
# Write different data to file
|
||||
./src/file -D -w file.txt " $data"
|
||||
./src/file.run -D -w file.txt " $data"
|
||||
start_test
|
||||
assert_equal "$(cat $DATA_DIR/file.txt)" "0
|
||||
$data"
|
||||
|
|
|
@ -3,8 +3,8 @@ Import("env", "lib")
|
|||
|
||||
build = []
|
||||
for f in Glob("*.cpp"):
|
||||
src = str(f)
|
||||
name = src.split(".")[0]
|
||||
build += [ env.Program(name, [src] + lib) ]
|
||||
src = str(f)
|
||||
run = src.split(".")[0] + ".run"
|
||||
build += [ env.Program(run, [src] + lib) ]
|
||||
|
||||
Return("build")
|
||||
|
|
|
@ -10,15 +10,5 @@ version=$(config_version)
|
|||
|
||||
|
||||
# Run test
|
||||
out=$(./src/version)
|
||||
|
||||
|
||||
# Analyze result
|
||||
[ "$version" == "$out" ] && test_success
|
||||
|
||||
function on_failed
|
||||
{
|
||||
echo " Expected version: $version"
|
||||
echo " Actual version: $out"
|
||||
}
|
||||
test_failed
|
||||
echo -n "Version test ... "
|
||||
assert_equal "$(./src/version.run)" "$version"
|
||||
|
|
Loading…
Reference in New Issue