Skip to content

Commit cb2a78b

Browse files
committed
improve bash tests & fix extra-source-files
1 parent 27dd471 commit cb2a78b

File tree

4 files changed

+32
-7
lines changed

4 files changed

+32
-7
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ testwindows:
7171
testexamples: build
7272
$(SHELLTEST) tests/examples
7373

74+
# run tests that require --shell /bin/bash
7475
testbash: build
76+
@echo fail when run with /bin/sh
7577
! $(SHELLTEST) tests/bash
78+
@echo succeed when run with /bin/bash
7679
$(SHELLTEST) tests/bash --shell /bin/bash
7780

7881
# run shell tests with several ghc versions
@@ -94,7 +97,7 @@ html: $(patsubst %.md,%.html,$(wildcard *.md)) Makefile
9497

9598
# generate html from a md file
9699
%.html: %.md #index.tmpl
97-
$(PANDOC) $< -o $@ #--template index.tmpl
100+
$(PANDOC) $< -o $@ #--template index.tmpl
98101

99102
# regenerate html files when the corresponding markdown file changes
100103
liverender:

shelltestrunner.cabal

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,29 @@ build-type: Simple
2424

2525
extra-tmp-files:
2626
extra-source-files:
27-
README.md
28-
CHANGES
2927
ANNOUNCE
30-
tests/format1/*.test
28+
CHANGES
29+
Makefile
30+
README.md
31+
tests/README
32+
tests/bash/*.test
33+
tests/examples/*.test
34+
tests/examples/README
3135
tests/format1.unix/*.test
3236
tests/format1.windows/*.test
33-
tests/format2/*.test
37+
tests/format1/*.test
38+
tests/format1/abstract-test-with-macros
39+
tests/format1/one-failing-test
3440
tests/format2.unix/*.test
3541
tests/format2.windows/*.test
36-
tests/format3/*.test
42+
tests/format2/*.test
43+
tests/format2/abstract-test-with-macros
44+
tests/format2/one-failing-test
3745
tests/format3.unix/*.test
3846
tests/format3.windows/*.test
39-
tests/examples/*.test
47+
tests/format3/*.test
48+
tests/format3/abstract-test-with-macros
49+
tests/format3/one-failing-test
4050

4151
executable shelltest
4252
ghc-options: -threaded -W -fwarn-tabs

tests/bash/dollar-quote.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Test bash-only $'...' syntax.
2+
# This only works when run with --shell /bin/bash
3+
# See also: https://github.com/simonmichael/shelltestrunner/issues/15
14
echo $'\'o\' `elem` p'
25
>>>
36
'o' `elem` p
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Test bash-only <( ... ) syntax.
2+
# This only works when run with --shell /bin/bash
3+
diff <( echo foo ) <( echo bar )
4+
>>>
5+
1c1
6+
< foo
7+
---
8+
> bar
9+
>>>= 1

0 commit comments

Comments
 (0)