[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Tue May 29 16:37:58 UTC 2007


 tests/t0000-basic.sh      |    5 +++--
 tests/t1100-busy-label.sh |    3 ++-
 tests/t2000-mkfs.sh       |    5 +++++
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 6c2a5b241e1452fce7e79383610ee978ee1f7e6f
Author: Jim Meyering <jim at meyering.net>
Date:   Tue May 29 17:36:41 2007 +0200

    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...

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 &&



More information about the Parted-commits mailing list