Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dry up testcase

  • Loading branch information...
commit 69fd0a058ec9d5519e54a18586838090759e4ce8 1 parent 2df72e9
@thinkerbot authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 design/test/test/test_helper
View
11 design/test/test/test_helper
@@ -3,9 +3,7 @@ assert_status_equal () {
if [ $actual -ne $expected ]
then
- echo "$TEST_CASE:$lineno $TEST_NAME" 1>&2
- echo "expected exit status $expected but was $actual\n" 1>&2
-
+ fail "expected exit status $expected but was $actual\n"
return 1
fi
}
@@ -18,8 +16,7 @@ assert_output_equal () {
echo -e "$expected" > "$0_$2_expected.txt"
echo -e "$actual" > "$0_$2_actual.txt"
- echo "$TEST_CASE:$lineno $TEST_NAME" 1>&2
- echo "unequal output:\n$(diff "$0_$2_expected.txt" "$0_$2_actual.txt")\n" 1>&2
+ fail "unequal output:\n$(diff "$0_$2_expected.txt" "$0_$2_actual.txt")\n"
rm "$0_$2_expected.txt" "$0_$2_actual.txt"
return 1
@@ -31,6 +28,10 @@ assert_equal () {
assert_output_equal "$2" $3
}
+fail () {
+ echo "$TEST_CASE:$lineno $TEST_NAME" 1>&2
+ echo "$1" 1>&2
+}
run_tests () {
test_file=$1
Please sign in to comment.
Something went wrong with that request. Please try again.