diff options
author | David P <megver83@parabola.nu> | 2017-07-29 21:59:30 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2017-07-29 21:59:30 -0400 |
commit | 5e9742f03e4199c006b0f9d0d8069a2fb41d9258 (patch) | |
tree | c5e7c30625b30b50a2a2385ef934c1d7e57eb2fa /test/librechroot-test.sh | |
parent | 63f4ac3c0a6ea7e060720b63964cf158157fc785 (diff) | |
parent | 0b8606e0cd0e1aedfe222d4d6603c4986aacb7b5 (diff) |
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 |