]> gitweb.fluxo.info Git - trashman.git/commitdiff
Some test enhancements
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 12 Nov 2017 12:53:07 +0000 (10:53 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 12 Nov 2017 12:53:07 +0000 (10:53 -0200)
share/trashman/docker/unix/linux/debian/test
share/trashman/nodejs/unix/linux/debian/test
share/trashman/trashman/functions

index 684453c9ac3efacfb70c42d0361a7b18931ed3b6..69611baf4d3adff1e3c23685cffa383d1d1d3d77 100755 (executable)
@@ -9,7 +9,7 @@ SHARE="$1"
 # Include basic functions
 . $SHARE/trashman/functions || exit 1
 
-# Basic check
+# Basic test
 if ! which docker > /dev/null 2>&1; then
   exit 1
 fi
index f465bb64726b8a4ed7def25fbdf204c20df3f12f..6af295bcaadc388185e87a6107362a157d774f79 100755 (executable)
@@ -9,9 +9,14 @@ SHARE="$1"
 # Include basic functions
 . $SHARE/trashman/functions || exit 1
 
+# Basic test
+if ! which nodejs > /dev/null 2>&1; then
+  exit 1
+fi
+
 # Run hello-world test program
-__trashman_echo "Check if nodejs runs..."
-nodejs -v > /dev/null 2>&1
+__trashman_echo_keepline "Testing program version... "
+nodejs -v
 status="$?"
 
 # Test exit status
index 4208b456e337058147eb0256c8f06357e792df11..133552806eb854a653840f83a988bd6ba38fc666 100644 (file)
@@ -13,6 +13,12 @@ __trashman_echo() {
   echo "-> $*"
 }
 
+# Message, no newline
+__trashman_echo_keepline() {
+  #echo ""
+  echo -n "-> $*"
+}
+
 # Our most common ancestor
 __trashman_ancestor() {
   echo "unix"