summaryrefslogtreecommitdiff
path: root/src/chroot-tools
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-01 15:54:05 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 20:01:05 -0600
commitc129ad75fceba7eb980874bb15954a1889d1f33a (patch)
tree363642b588f24cc7eee97a332bff054964c109d4 /src/chroot-tools
parente25ea3cdf25c061de02507f11265730ca74ab7e7 (diff)
Add tests for librechroot's help system, make them pass.
They didn't pass because on several errors it printed to stdout, not stderr
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-xsrc/chroot-tools/librechroot5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 80c7f4f..ca76569 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -133,13 +133,13 @@ main() {
}
;;
C|M) archroot_args+=(-$arg "$OPTARG");;
- *) usage; return 1;;
+ *) usage >/dev/stderr; return 1;;
esac
done
shift $(($OPTIND - 1))
if [[ $# < 1 ]]; then
error "Must specify a command"
- usage
+ usage >/dev/stderr
return 1
fi
mode=$1
@@ -243,6 +243,7 @@ main() {
;;
*)
error "Unrecognized command: \`$mode'"
+ usage >/dev/stderr
return 1
;;
esac