diff options
author | Stefan Holdermans <stefan@holdermans.nl> | 2020-04-20 21:22:30 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-21 12:16:08 -0400 |
commit | 82663959d2f1ddbb514a652593bc8064fd69d6aa (patch) | |
tree | c65f66d09e96e59e410f6919d89a3e18f19bbe5f | |
parent | a8c27cf6eef51adfa6ac9931d4f620645dc24dd3 (diff) | |
download | haskell-82663959d2f1ddbb514a652593bc8064fd69d6aa.tar.gz |
Add extra tests for GHCi :script syntax checks
The syntax for GHCi's ":script" command allows for only a single file
name to be passed as an argument. This patch adds a test for the cases
in which a file name is missing or multiple file names are passed.
Related to #T18027.
-rw-r--r-- | testsuite/tests/ghci/should_fail/T18027a.script | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/should_fail/T18027a.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/should_fail/all.T | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/should_fail/T18027a.script b/testsuite/tests/ghci/should_fail/T18027a.script new file mode 100644 index 0000000000..c1d4a5a8c5 --- /dev/null +++ b/testsuite/tests/ghci/should_fail/T18027a.script @@ -0,0 +1,2 @@ +:script +:script one two diff --git a/testsuite/tests/ghci/should_fail/T18027a.stderr b/testsuite/tests/ghci/should_fail/T18027a.stderr new file mode 100644 index 0000000000..b320128f46 --- /dev/null +++ b/testsuite/tests/ghci/should_fail/T18027a.stderr @@ -0,0 +1,2 @@ +syntax: :script <filename> +syntax: :script <filename> diff --git a/testsuite/tests/ghci/should_fail/all.T b/testsuite/tests/ghci/should_fail/all.T index 6c8d0ac000..f2618ce08c 100644 --- a/testsuite/tests/ghci/should_fail/all.T +++ b/testsuite/tests/ghci/should_fail/all.T @@ -4,3 +4,4 @@ test('T15055', normalise_version('ghc'), ghci_script, ['T15055.script']) test('T16013', [], ghci_script, ['T16013.script']) test('T16287', [], ghci_script, ['T16287.script']) test('T18052b', [], ghci_script, ['T18052b.script']) +test('T18027a', [], ghci_script, ['T18027a.script']) |