diff --git a/tools/regression/usr.bin/sed/multitest.t b/tools/regression/usr.bin/sed/multitest.t index 5ddc1e12ead8..1993f9ae920b 100644 --- a/tools/regression/usr.bin/sed/multitest.t +++ b/tools/regression/usr.bin/sed/multitest.t @@ -104,72 +104,33 @@ test_args() mark '1.1' echo Testing argument parsing echo First type - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED 's/^/e1_/p' lines1 - fi + $SED 's/^/e1_/p' lines1 mark '1.2' ; $SED -n 's/^/e1_/p' lines1 mark '1.3' - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED 's/^/e1_/p' script1 echo 's/^/s2_/p' >script2 mark '1.5' - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED -f script1 lines1 - fi + $SED -f script1 lines1 mark '1.6' - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED -f script1 script1 < lines3 echo "" >> lines3 @@ -438,10 +392,13 @@ test_subst() echo Testing substitution commands mark '8.1' ; $SED -e 's/./X/g' lines1 mark '8.2' ; $SED -e 's,.,X,g' lines1 -# GNU and SunOS sed thinks we are escaping . as wildcard, not as separator -# mark '8.3' ; $SED -e 's.\..X.g' lines1 -# POSIX does not say that this should work -# mark '8.4' ; $SED -e 's/[/]/Q/' lines1 +# SunOS sed thinks we are escaping . as wildcard, not as separator + mark '8.3' + if [ $SUN -eq 1 ] ; then + echo SUN sed fails test 8.3 + else + $SED -e 's.\..X.g' lines1 + fi mark '8.4' ; $SED -e 's/[\/]/Q/' lines1 mark '8.5' ; $SED -e 's_\__X_' lines1 mark '8.6' ; $SED -e 's/./(&)/g' lines1 @@ -459,11 +416,7 @@ u2/g' lines1 mark '8.12' ; $SED -e 's/[123]/X/g' lines1 mark '8.13' ; $SED -e 'y/0123456789/9876543210/' lines1 mark '8.14' ; - if [ $SUN -eq 1 ] ; then - echo SUN sed fails this test - else - $SED -e 'y10\123456789198765432\101' lines1 - fi + $SED -e 'y10\123456789198765432\101' lines1 mark '8.15' ; $SED -e '1N;2y/\n/X/' lines1 mark '8.16' echo 'eeefff' | $SED -e ' @@ -482,6 +435,9 @@ u2/g' lines1 x /f/bx ' + # POSIX does not say that this should work, + # but it does for GNU, BSD, and SunOS + mark '8.17' ; $SED -e 's/[/]/Q/' lines1 } test_error() diff --git a/tools/regression/usr.bin/sed/sed.test b/tools/regression/usr.bin/sed/sed.test index 5ddc1e12ead8..1993f9ae920b 100644 --- a/tools/regression/usr.bin/sed/sed.test +++ b/tools/regression/usr.bin/sed/sed.test @@ -104,72 +104,33 @@ test_args() mark '1.1' echo Testing argument parsing echo First type - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED 's/^/e1_/p' lines1 - fi + $SED 's/^/e1_/p' lines1 mark '1.2' ; $SED -n 's/^/e1_/p' lines1 mark '1.3' - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED 's/^/e1_/p' script1 echo 's/^/s2_/p' >script2 mark '1.5' - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED -f script1 lines1 - fi + $SED -f script1 lines1 mark '1.6' - if [ $SUN -eq 1 ] ; then - echo SunOS sed prints only with -n - else - $SED -f script1 script1 < lines3 echo "" >> lines3 @@ -438,10 +392,13 @@ test_subst() echo Testing substitution commands mark '8.1' ; $SED -e 's/./X/g' lines1 mark '8.2' ; $SED -e 's,.,X,g' lines1 -# GNU and SunOS sed thinks we are escaping . as wildcard, not as separator -# mark '8.3' ; $SED -e 's.\..X.g' lines1 -# POSIX does not say that this should work -# mark '8.4' ; $SED -e 's/[/]/Q/' lines1 +# SunOS sed thinks we are escaping . as wildcard, not as separator + mark '8.3' + if [ $SUN -eq 1 ] ; then + echo SUN sed fails test 8.3 + else + $SED -e 's.\..X.g' lines1 + fi mark '8.4' ; $SED -e 's/[\/]/Q/' lines1 mark '8.5' ; $SED -e 's_\__X_' lines1 mark '8.6' ; $SED -e 's/./(&)/g' lines1 @@ -459,11 +416,7 @@ u2/g' lines1 mark '8.12' ; $SED -e 's/[123]/X/g' lines1 mark '8.13' ; $SED -e 'y/0123456789/9876543210/' lines1 mark '8.14' ; - if [ $SUN -eq 1 ] ; then - echo SUN sed fails this test - else - $SED -e 'y10\123456789198765432\101' lines1 - fi + $SED -e 'y10\123456789198765432\101' lines1 mark '8.15' ; $SED -e '1N;2y/\n/X/' lines1 mark '8.16' echo 'eeefff' | $SED -e ' @@ -482,6 +435,9 @@ u2/g' lines1 x /f/bx ' + # POSIX does not say that this should work, + # but it does for GNU, BSD, and SunOS + mark '8.17' ; $SED -e 's/[/]/Q/' lines1 } test_error()