[gjs] tests: Use bash TAP functions in bash script



commit 63c9c5c405a9f012a1a3df41f5af080ef574b0b9
Author: Philip Chimento <philip endlessm com>
Date:   Tue Mar 7 18:22:10 2017 -0800

    tests: Use bash TAP functions in bash script
    
    Previously these tests did nothing because the call to the nonexistent
    "fail" function simply failed quietly and didn't print any TAP output.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779692

 installed-tests/scripts/testCommandLine.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/installed-tests/scripts/testCommandLine.sh b/installed-tests/scripts/testCommandLine.sh
index 95c5535..5de7604 100755
--- a/installed-tests/scripts/testCommandLine.sh
+++ b/installed-tests/scripts/testCommandLine.sh
@@ -40,11 +40,11 @@ report_xfail () {
 }
 
 # Test that System.exit() works in gjs-console
-"$gjs" -c 'imports.system.exit(0)' || \
-    fail "System.exit(0) should exit successfully"
-if "gjs" -c 'imports.system.exit(42)' -ne 42; then
-    fail "System.exit(42) should exit with the correct exit code"
-fi
+"$gjs" -c 'imports.system.exit(0)'
+report "System.exit(0) should exit successfully"
+"gjs" -c 'imports.system.exit(42)'
+test $? -eq 42
+report "System.exit(42) should exit with the correct exit code"
 
 # gjs --help prints GJS help
 "$gjs" --help >/dev/null


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]