summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-01-03 15:42:32 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-01-03 15:42:32 +0200
commitec3227366aa5b2c42830beb61d9c63427ba4cc6f (patch)
treed55952566b705e26c75014cb7b07d5a1997b3cc4 /test/lib
parentaae256d7e05d1dc4847eff0eb8230edf7655f3d6 (diff)
downloadbash-completion-ec3227366aa5b2c42830beb61d9c63427ba4cc6f.tar.gz
(testsuite) Make diff_env() compatible with Solaris sed.
It appears to tolerate comments only at beginning of line.
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/library.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/lib/library.sh b/test/lib/library.sh
index 476cea33..f995d5bf 100644
--- a/test/lib/library.sh
+++ b/test/lib/library.sh
@@ -15,12 +15,16 @@ add_comp_wordbreak_char() {
# @param $2 File 2
# @param $3 Additional sed script
diff_env() {
- diff "$1" "$2" | sed -e "
- /^[0-9,]\{1,\}[acd]/d # Remove diff line indicators
- /---/d # Remove diff block separators
- /[<>] _=/d # Remove underscore variable
- /[<>] PPID=/d # Remove PPID bash variable
- $3"
+ diff "$1" "$2" | sed -e "
+# Remove diff line indicators
+ /^[0-9,]\{1,\}[acd]/d
+# Remove diff block separators
+ /---/d
+# Remove underscore variable
+ /[<>] _=/d
+# Remove PPID bash variable
+ /[<>] PPID=/d
+ $3"
} # diff_env()