test: failing 100-sed-autoconf-dirname test.

This commit is contained in:
Jan Nieuwenhuizen 2018-12-09 04:28:27 +01:00
parent 8757ab67fb
commit 0568f73a21
3 changed files with 17 additions and 0 deletions

View File

@ -144,6 +144,7 @@ tests='
100-sed-undo
100-sed-file
100-sed-fooRbar
100-sed-autoconf-dirname
100-tar
100-tar-Z

View File

@ -0,0 +1,15 @@
dirname='/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
echo 'X/foo/bar' | \sed "$dirname"

View File

@ -0,0 +1 @@
bar