]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
tests/lib.sh.test: Use return instead of exit in a subshell.
authorSimon Ruderich <simon@ruderich.org>
Sun, 7 Mar 2010 20:59:03 +0000 (21:59 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sun, 7 Mar 2010 20:59:03 +0000 (21:59 +0100)
tests/lib.sh.test

index 171c7c23ad583f21bf29f3c898fe7e628c230f17..e8d5053be6ebec71118818ad1c3a7505b0787525 100644 (file)
@@ -9,7 +9,7 @@ which() {
         echo /bin/ls
     else
         echo no doesnt-exist in /usr/bin /bin /usr/sbin /sbin
-        (exit 1)
+        return 1
     fi
 }
 echo stdout which
@@ -22,7 +22,7 @@ which() {
         echo /bin/ls
     else
         echo no doesnt-exist in /usr/bin /bin /usr/sbin /sbin >&2
-        (exit 1)
+        return 1
     fi
 }
 echo stderr which