From 60c8695a6d833380fdae04a2e3ca7efcd43373de Mon Sep 17 00:00:00 2001 From: Denis Buzdalov Date: Wed, 25 Nov 2020 21:27:23 +0300 Subject: [PATCH] Editor was made run apostrophe-containing modules from REPL normally. --- src/Idris/REPL.idr | 2 +- tests/idris2/basic048/expected | 3 +++ tests/idris2/basic048/input-ed | 1 + tests/idris2/basic048/run | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/idris2/basic048/input-ed diff --git a/src/Idris/REPL.idr b/src/Idris/REPL.idr index 0a924cb64..873564646 100644 --- a/src/Idris/REPL.idr +++ b/src/Idris/REPL.idr @@ -706,7 +706,7 @@ process Edit Nothing => pure NoFileLoaded Just f => do let line = maybe "" (\i => " +" ++ show (i + 1)) (errorLine opts) - coreLift $ system (editor opts ++ " " ++ f ++ line) + coreLift $ system (editor opts ++ " \"" ++ f ++ "\"" ++ line) loadMainFile f process (Compile ctm outfile) = compileExp ctm outfile diff --git a/tests/idris2/basic048/expected b/tests/idris2/basic048/expected index 5cb4d4c79..1e74b83ae 100644 --- a/tests/idris2/basic048/expected +++ b/tests/idris2/basic048/expected @@ -2,3 +2,6 @@ Module'> 2 Module'> Bye for now! "5" +Module'> Loaded file Module'.idr +Module'> +Bye for now! diff --git a/tests/idris2/basic048/input-ed b/tests/idris2/basic048/input-ed new file mode 100644 index 000000000..43e460ec6 --- /dev/null +++ b/tests/idris2/basic048/input-ed @@ -0,0 +1 @@ +:e diff --git a/tests/idris2/basic048/run b/tests/idris2/basic048/run index 2731baecf..558302c9e 100644 --- a/tests/idris2/basic048/run +++ b/tests/idris2/basic048/run @@ -1,4 +1,5 @@ $1 --no-banner --no-color --console-width 0 "Module'.idr" < input $1 --exec main --cg ${IDRIS2_TESTS_CG} "Module'.idr" +EDITOR=true $1 --no-banner --no-color --console-width 0 "Module'.idr" < input-ed rm -rf build