diff options
Diffstat (limited to 'test/librechroot-test.sh')
-rw-r--r-- | test/librechroot-test.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh index d225834..42d4803 100644 --- a/test/librechroot-test.sh +++ b/test/librechroot-test.sh @@ -82,6 +82,17 @@ it_displays_help_and_fails_with_0_args() { [[ "$(sed -n 2p $tmpdir/stderr)" =~ Usage:.* ]] } +it_obeys_the_n_flag() { + require network sudo || return 0 + + not test -f "$chrootdir/$roundup_test_name/$roundup_test_name/$roundup_test_name.stamp" + + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + testsudo librechroot -n "$roundup_test_name" -l "$roundup_test_name" run touch /"$roundup_test_name.stamp" + + test -f "$chrootdir/$roundup_test_name/$roundup_test_name/$roundup_test_name.stamp" +} + # requires sudo so we know it's not failing because it needs root it_fails_for_unknown_commands() { require sudo || return 0 |