diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-03-18 20:08:08 +0100 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-12-24 19:52:22 +0100 |
commit | 48db13d279d592ed3044cbaf3513854bcb0d3dce (patch) | |
tree | fecc90166a269f14b76687a5472fee34ad305c7b /testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail07.stderr | |
parent | e33837677fc4d1d9bd6fdad4e9fd8c61a639f52e (diff) | |
download | haskell-48db13d279d592ed3044cbaf3513854bcb0d3dce.tar.gz |
Don't drop last char of file if -osuf contains dot
Given:
* `file = "foo.a.b"`
* `osuf = ".a.b"` -- Note the initial dot.
* `new_osuf = "c"`
Before (bad, the last character of the filename is dropped):
`dropTail (length osuf + 1) file <.> new_osuf == "fo.c"`
After (good):
`stripExtension osuf file <.> new_osuf` == "foo.c"
This regression was introduced in commit c489af73 (#5554). That commit
fixed a similar but different bug, and care has been taken to not
reintroduce it (using the the newly introduced
`System.Filepath.stripExtension`).
Given:
* `file = "foo.a.b"`
* `osuf = "a.b"`
* `new_osuf = "c"`
Before c489af73 (bad, the full suffix should get replaced):
`replaceExtension file new_osuf == "foo.a.c"`
After c489af73 (good):
`dropTail (length osuf + 1) file <.> new_osuf == "foo.c"`
After this commit (still good):
`stripExtension osuf file <.> new_osuf == "foo.c"`
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1692
GHC Trac Issues: #9760
Diffstat (limited to 'testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail07.stderr')
0 files changed, 0 insertions, 0 deletions