test: Use script file for sed basename test.
As of this commit, Gash does not process the quotes around the script properly, and ends up calling sed with no arguments.
This commit is contained in:
parent
8c5a9ea96f
commit
cb8b2758e0
|
@ -1,15 +1 @@
|
|||
basename='/^.*\/\([^/][^/]*\)\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\/\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\/\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
|
||||
echo 'X/foo/bar' | \sed "$basename"
|
||||
echo 'X/foo/bar' | \sed -f test/data/basename.sed
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/^.*\/\([^/][^/]*\)\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\/\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\/\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q
|
Loading…
Reference in New Issue