[parted-devel] [PATCH 2/3] Compensate for different behavior in t7000 test.

Joel Granados Moreno jgranado at redhat.com
Wed Aug 19 08:42:59 UTC 2009


When the t7000 test was first engineered the "n" did not appear in the
output when testing mkpart & mkpartfs.  ATM, for an unknown reason,
the "n" is being echoed in the resulting string causing test failure
when compared with the errI string.  This patch attempts to make both
behaviors (with and without the echoed "n") pass the test.

* tests/t7000-scripting.sh: Make sure we don't have an " n" at the end
of the output string.
---
 tests/t7000-scripting.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tests/t7000-scripting.sh b/tests/t7000-scripting.sh
index 91c4fd5..813841d 100755
--- a/tests/t7000-scripting.sh
+++ b/tests/t7000-scripting.sh
@@ -82,7 +82,8 @@ for mkpart in mkpart mkpartfs; do
   test_expect_success \
       'normalize the actual output' \
       '
-       sed "s,
   *
,,;s, $,," out > o2 && mv -f o2 out &&
+       echo -n x >> out &&
+       sed "s,
   *
,,;s, x$,,;/ n$/ {N;s, n\nx,,}" out > o2 && mv -f o2 out &&
        normalize_part_diag_ out
       '
 
-- 
1.6.4




More information about the parted-devel mailing list