hush_test: filter test output to avoid C lib differences
authorMike Frysinger <vapier@gentoo.org>
Mon, 1 Jun 2009 18:08:09 +0000 (14:08 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 1 Jun 2009 18:16:43 +0000 (14:16 -0400)
The getopt function in some C libraries wraps the option in single quotes
while others do not.  Avoid the issue by running sed on the output and
strip all quotes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
shell/hush_test/run-all

index 57a5c253b16950d6066aa714d20f3b523a97940c..cb9c5f321c75e881c1a0f45d47b1cb3c6f6819ca 100755 (executable)
@@ -52,6 +52,10 @@ do_test()
 #      echo Running test: "$x"
        (
            "$THIS_SH" "./$x" >"$name.xx" 2>&1
+           # filter C library differences
+           sed -i \
+               -e "/: invalid option /s:'::g" \
+               "$name.xx"
            test $? -eq 77 && rm -f "../$1-$x.fail" && exit 77
            diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
        )