Skip to content

Commit

Permalink
Refactored edit tests in shell testcases.
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Sep 15, 2015
1 parent 7c84838 commit e0b871e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV["JULIA_EDITOR"] = "subl -w"
ENV["JULIA_EDITOR"] = "/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl"
@test Base.editor() == ["/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"]

# Paths with spaces and arguments.
# Paths with spaces and arguments (#13032).
ENV["JULIA_EDITOR"] = "/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -w"
@test Base.editor() == ["/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", "-w"]

Expand Down
10 changes: 5 additions & 5 deletions test/shell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
@test Base.shell_split("'foo\\ bar' baz") == ["foo\\ bar", "baz"]
@test Base.shell_split("\"foo\\ bar\" baz") == ["foo\\ bar", "baz"]

# Ensure that split works on ENV["EDITOR"] parsing as used by "edit".
# See #13032.
@test Base.shell_split("Sublime\\ Text/subl -w") == ["Sublime Text/subl", "-w"]
@test Base.shell_split("'Sublime Text/subl' -w") == ["Sublime Text/subl", "-w"]
@test Base.shell_split("\"Sublime Text/subl\" -w") == ["Sublime Text/subl", "-w"]
# Ensure that shell_split handles quoted spaces
cmd = ["/Volumes/External HD/program", "-a"]
@test Base.shell_split("/Volumes/External\\ HD/program -a") == cmd
@test Base.shell_split("'/Volumes/External HD/program' -a") == cmd
@test Base.shell_split("\"/Volumes/External HD/program\" -a") == cmd

# Backticks should automatically quote where necessary
cmd = ["foo bar", "baz"]
Expand Down

0 comments on commit e0b871e

Please sign in to comment.