Treat comments ending in backslashes as not continuing onto the next line

Fixes #1255
This commit is contained in:
ridiculousfish
2015-05-02 18:22:20 -07:00
parent c59119e0b7
commit 3ca518255e
3 changed files with 34 additions and 2 deletions

View File

@@ -33,3 +33,9 @@ send_line $hist_command
expect_prompt -re {echo .history.*} {} unmatched {
puts stderr "Couldn't find expected output $hist_command"
}
# Backslashes at end of comments (#1255)
# This backslash should NOT cause the line to continue
send_line "echo -n #comment\\"
expect_prompt

View File

@@ -155,6 +155,11 @@ echo before comment \
# comment
after comment
# Backslashes are part of comments and do not join lines (#1255)
# This should execute false, not echo it
echo -n # comment\
false
function always_fails
if true
return 1