diff options
author | Jim Meyering <jim@meyering.net> | 2007-05-29 17:36:41 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-05-29 17:36:41 +0200 |
commit | 6c2a5b241e1452fce7e79383610ee978ee1f7e6f (patch) | |
tree | b444b5b481cc60d05c66fb6ad1de3f88f4874515 /tests | |
parent | 0c2d6ba0757324c3975cbf10868f266fe6dbbbfe (diff) | |
download | parted-6c2a5b241e1452fce7e79383610ee978ee1f7e6f.tar.gz |
On IRC, xeos reported test failures in t0000 and t2000
with diffs like this:
-/home/xeos/projects/parted/parted/.libs/lt-parted: invalid token: msdos
+parted: invalid token: msdos
Here's the patch I expect to apply.
It also removes an inter-part dependency by moving the creation
of the "o2" temporary file into the test where it's used.
Some of this duplication should be factored out, eventually...
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/t0000-basic.sh | 5 | ||||
-rwxr-xr-x | tests/t1100-busy-label.sh | 3 | ||||
-rwxr-xr-x | tests/t2000-mkfs.sh | 5 |
3 files changed, 10 insertions, 3 deletions
diff --git a/tests/t0000-basic.sh b/tests/t0000-basic.sh index 35bf6e6..5f651b3 100755 --- a/tests/t0000-basic.sh +++ b/tests/t0000-basic.sh @@ -71,13 +71,14 @@ test_expect_success 'create interactive input' 'printf "y\n\n" > in' # Now that there's a label, rerunning the same command is interactive. test_expect_success \ 'rerun that same command, but now with a preexisting label' \ - 'parted ---pretend-input-tty $dev mklabel msdos < in > o2 2>&1' + 'parted ---pretend-input-tty $dev mklabel msdos < in > out 2>&1' # Transform the actual output, to avoid spurious differences when # $PWD contains a symlink-to-dir. Also, remove the ^M ...^M bogosity. test_expect_success \ 'normalize the actual output' \ - 'sed "s,on /.*/$dev,on DEVICE,;s,
*
,,;s, $,," o2 > out' + 'mv out o2 && sed -e "s,on /.*/$dev,on DEVICE,;s,
*
,,;s, $,," \ + -e "s,^.*/lt-parted: ,parted: ," o2 > out' # Create expected output file. fail=0 diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh index d571ae1..d71da87 100755 --- a/tests/t1100-busy-label.sh +++ b/tests/t1100-busy-label.sh @@ -76,7 +76,8 @@ test_expect_success 'create expected output file' 'test $fail = 0' # Transform the actual output, removing ^M ...^M. test_expect_success \ 'normalize the actual output' \ - 'mv out o2 && sed "s,
*
,,;s, $,," o2 > out' + 'mv out o2 && sed -e "s,
*
,,;s, $,," o2 \ + -e "s,^.*/lt-parted: ,parted: ," o2 > out' test_expect_success \ 'check for expected failure diagnostic' \ diff --git a/tests/t2000-mkfs.sh b/tests/t2000-mkfs.sh index fb39815..e1a01fc 100755 --- a/tests/t2000-mkfs.sh +++ b/tests/t2000-mkfs.sh @@ -96,6 +96,11 @@ test_expect_failure \ 'parted -s $dev mkpartfs primary bogus 1 1 >out 2>&1' test_expect_success \ + 'normalize the actual output' \ + 'mv out o2 && sed -e "s,
*
,,;s, $,," \ + -e "s,^.*/lt-parted: ,parted: ," o2 > out' + +test_expect_success \ 'check for expected diagnostic' \ '{ echo "parted: invalid token: bogus" echo "Error: Expecting a file system type."; } > exp && |