summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorStefan Holdermans <stefan@holdermans.nl>2020-04-20 21:01:46 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-21 12:16:08 -0400
commita8c27cf6eef51adfa6ac9931d4f620645dc24dd3 (patch)
tree98776442314e078f9cc1833a21dfb5870058eb8d /testsuite
parentb7a6b2f4c690a9711339462114a538a85dcb7d83 (diff)
downloadhaskell-a8c27cf6eef51adfa6ac9931d4f620645dc24dd3.tar.gz
Allow spaces in GHCi :script file names
This patch updates the user interface of GHCi so that file names passed to the ':script' command may contain spaces escaped with a backslash. For example: :script foo\ bar.script The implementation uses a modified version of 'words' that does not break on escaped spaces. Fixes #18027.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghci/should_run/T18027 SPACE IN FILE NAME.script1
-rw-r--r--testsuite/tests/ghci/should_run/T18027.script1
-rw-r--r--testsuite/tests/ghci/should_run/T18027.stdout1
-rw-r--r--testsuite/tests/ghci/should_run/all.T1
4 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/should_run/T18027 SPACE IN FILE NAME.script b/testsuite/tests/ghci/should_run/T18027 SPACE IN FILE NAME.script
new file mode 100644
index 0000000000..d81cc0710e
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T18027 SPACE IN FILE NAME.script
@@ -0,0 +1 @@
+42
diff --git a/testsuite/tests/ghci/should_run/T18027.script b/testsuite/tests/ghci/should_run/T18027.script
new file mode 100644
index 0000000000..fd839d2392
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T18027.script
@@ -0,0 +1 @@
+:script T18027\ SPACE\ IN\ FILE\ NAME.script
diff --git a/testsuite/tests/ghci/should_run/T18027.stdout b/testsuite/tests/ghci/should_run/T18027.stdout
new file mode 100644
index 0000000000..d81cc0710e
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T18027.stdout
@@ -0,0 +1 @@
+42
diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T
index 4a629350a2..6d39d5794c 100644
--- a/testsuite/tests/ghci/should_run/all.T
+++ b/testsuite/tests/ghci/should_run/all.T
@@ -64,3 +64,4 @@ test('T15633b',
test('T16096', just_ghci, ghci_script, ['T16096.script'])
test('T507', just_ghci, ghci_script, ['T507.script'])
+test('T18027', just_ghci, ghci_script, ['T18027.script'])