summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-03-18 20:08:08 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2015-12-24 19:52:22 +0100
commit48db13d279d592ed3044cbaf3513854bcb0d3dce (patch)
treefecc90166a269f14b76687a5472fee34ad305c7b /testsuite/tests/gadt
parente33837677fc4d1d9bd6fdad4e9fd8c61a639f52e (diff)
downloadhaskell-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/gadt')
0 files changed, 0 insertions, 0 deletions