summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/t0000-basic.sh5
-rwxr-xr-xtests/t1100-busy-label.sh3
-rwxr-xr-xtests/t2000-mkfs.sh5
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 &&