Fix uninformative hp2ps error when the cmdline contains double quotes
authorZejun Wu <watashi@fb.com>
Tue, 11 Dec 2018 18:18:03 +0000 (13:18 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 11 Dec 2018 18:18:15 +0000 (13:18 -0500)
commit0136906c9e69b02cd1ffe2704fa5d737d8c4cfaf
treefadb44152e6ef39ec28a0a95169b417b982ae2d8
parent0ff5ecfbc543d80d1668fec460df90b98d563898
Fix uninformative hp2ps error when the cmdline contains double quotes

Reapply D5346 with fix incompatible shell quoting in tests. It seems
like `$'string'` is not recognized under all test environments, so let's
avoid it in tests.

Test Plan:
```
hp2ps: "T15904".hp, line 2: integer must follow identifier
```

use new ghc and hp2ps to profile a simple program.

Reviewers: simonmar, bgamari, erikd, tdammers

Reviewed By: bgamari

Subscribers: tdammers, carter, rwbarton

GHC Trac Issues: #15904

Differential Revision: https://phabricator.haskell.org/D5388
rts/ProfHeap.c
testsuite/tests/hp2ps/Makefile [new file with mode: 0644]
testsuite/tests/hp2ps/T15904.hs [new file with mode: 0644]
testsuite/tests/hp2ps/T15904.stdout [new file with mode: 0644]
testsuite/tests/hp2ps/all.T [new file with mode: 0644]
utils/hp2ps/HpFile.c