Closed alzwded closed 3 years ago
Test:
AT_SETUP([/a.b/c:r doesn't remove path elements])
AT_DATA([colon_r_no_extension.csh],
[[set x='/a.b/c'
echo $x:r
exit 0
]])
AT_CHECK([tcsh -f colon_r_no_extension.csh], 0,
[/a.b/c
])
AT_CLEANUP
Fixed, thanks!
Commit e43828d2382e8d5252634829a06a91816491f384 broke
r
The following snippet now works like this:
Previously, it printed
/a.b/c
as expected.:r
removes the extension and returns the base name and path, not strip entire path elements. The current code doesn't stop when encountering a/
.