Skip to content

improve bash tests & fix extra-source-files #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ testwindows:
testexamples: build
$(SHELLTEST) tests/examples

# run tests that require --shell /bin/bash
testbash: build
@echo fail when run with /bin/sh
! $(SHELLTEST) tests/bash
@echo succeed when run with /bin/bash
$(SHELLTEST) tests/bash --shell /bin/bash

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

# generate html from a md file
%.html: %.md #index.tmpl
$(PANDOC) $< -o $@ #--template index.tmpl
$(PANDOC) $< -o $@ #--template index.tmpl

# regenerate html files when the corresponding markdown file changes
liverender:
Expand Down
22 changes: 16 additions & 6 deletions shelltestrunner.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,29 @@ build-type: Simple

extra-tmp-files:
extra-source-files:
README.md
CHANGES
ANNOUNCE
tests/format1/*.test
CHANGES
Makefile
README.md
tests/README
tests/bash/*.test
tests/examples/*.test
tests/examples/README
tests/format1.unix/*.test
tests/format1.windows/*.test
tests/format2/*.test
tests/format1/*.test
tests/format1/abstract-test-with-macros
tests/format1/one-failing-test
tests/format2.unix/*.test
tests/format2.windows/*.test
tests/format3/*.test
tests/format2/*.test
tests/format2/abstract-test-with-macros
tests/format2/one-failing-test
tests/format3.unix/*.test
tests/format3.windows/*.test
tests/examples/*.test
tests/format3/*.test
tests/format3/abstract-test-with-macros
tests/format3/one-failing-test

executable shelltest
ghc-options: -threaded -W -fwarn-tabs
Expand Down
3 changes: 3 additions & 0 deletions tests/bash/dollar-quote.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Test bash-only $'...' syntax.
# This only works when run with --shell /bin/bash
# See also: https://github.com/simonmichael/shelltestrunner/issues/15
echo $'\'o\' `elem` p'
>>>
'o' `elem` p
Expand Down
9 changes: 9 additions & 0 deletions tests/bash/process-substitution.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Test bash-only <( ... ) syntax.
# This only works when run with --shell /bin/bash
diff <( echo foo ) <( echo bar )
>>>
1c1
< foo
---
> bar
>>>= 1