diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-03 15:42:32 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-03 15:42:32 +0200 |
commit | ec3227366aa5b2c42830beb61d9c63427ba4cc6f (patch) | |
tree | d55952566b705e26c75014cb7b07d5a1997b3cc4 /test | |
parent | aae256d7e05d1dc4847eff0eb8230edf7655f3d6 (diff) | |
download | bash-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')
-rw-r--r-- | test/lib/library.sh | 16 |
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() |