diff options
author | Alexey Kuleshevich <alexey@kuleshevi.ch> | 2019-08-18 03:38:37 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-19 20:39:20 -0500 |
commit | ef8a08e0dd4e5b908b7fbce1b3101dc311c4d3e1 (patch) | |
tree | a30180b45f705c3006fb4628b2e6284aab49f065 /testsuite | |
parent | d1f3c63701b7f0fd675f792af7f33c5b11eaff83 (diff) | |
download | haskell-ef8a08e0dd4e5b908b7fbce1b3101dc311c4d3e1.tar.gz |
hpc: Fix encoding issues. Add test for and fix #17073
* Make sure files are being read/written in UTF-8. Set encoding while writing
HTML output. Also set encoding while writing and reading .tix files although
we don't yet have a ticket complaining that this poses problems.
* Set encoding in html header to utf8
* Upgrade to new version of 'hpc' library and reuse `readFileUtf8`
and `writeFileUtf8` functions
* Update git submodule for `hpc`
* Bump up `hpc` executable version
Co-authored-by: Ben Gamari <ben@smart-cactus.org>
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/hpc/Makefile | 8 | ||||
-rw-r--r-- | testsuite/tests/hpc/T17073.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/hpc/T17073.stdout | 15 | ||||
-rw-r--r-- | testsuite/tests/hpc/all.T | 2 |
4 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/hpc/Makefile b/testsuite/tests/hpc/Makefile index 6de7ceefc1..5945bb8dd0 100644 --- a/testsuite/tests/hpc/Makefile +++ b/testsuite/tests/hpc/Makefile @@ -7,3 +7,11 @@ T11798: "$(TEST_HC)" $(TEST_HC_ARGS) T11798 "$(TEST_HC)" $(TEST_HC_ARGS) T11798 -fhpc test -e .hpc/T11798.mix + +T17073: + LANG=ASCII "$(TEST_HC)" $(TEST_HC_ARGS) T17073.hs -fhpc -v0 + ./T17073 + $(HPC) report T17073 + $(HPC) version + LANG=ASCII $(HPC) markup T17073 + diff --git a/testsuite/tests/hpc/T17073.hs b/testsuite/tests/hpc/T17073.hs new file mode 100644 index 0000000000..d1e0a45b9a --- /dev/null +++ b/testsuite/tests/hpc/T17073.hs @@ -0,0 +1,5 @@ +module Main where + +main :: IO () +main = putStrLn "Добрый день" + diff --git a/testsuite/tests/hpc/T17073.stdout b/testsuite/tests/hpc/T17073.stdout new file mode 100644 index 0000000000..db489a3eac --- /dev/null +++ b/testsuite/tests/hpc/T17073.stdout @@ -0,0 +1,15 @@ +Добрый день +100% expressions used (2/2) +100% boolean coverage (0/0) + 100% guards (0/0) + 100% 'if' conditions (0/0) + 100% qualifiers (0/0) +100% alternatives used (0/0) +100% local declarations used (0/0) +100% top-level declarations used (1/1) +hpc tools, version 0.68 +Writing: Main.hs.html +Writing: hpc_index.html +Writing: hpc_index_fun.html +Writing: hpc_index_alt.html +Writing: hpc_index_exp.html
\ No newline at end of file diff --git a/testsuite/tests/hpc/all.T b/testsuite/tests/hpc/all.T index ed68e29332..bd32c64148 100644 --- a/testsuite/tests/hpc/all.T +++ b/testsuite/tests/hpc/all.T @@ -21,3 +21,5 @@ test('T2991', [cmd_wrapper(T2991), extra_clean(['T2991LiterateModule.hi', 'T2991LiterateModule.o'])], # Run with 'ghc --main'. Do not list other modules explicitly. multimod_compile_and_run, ['T2991', '']) + +test('T17073', normal, makefile_test, ['T17073 HPC={hpc}']) |