diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/generic.expect | 6 | ||||
-rw-r--r-- | tests/test1.in | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/generic.expect b/tests/generic.expect index 7a5b6407..33d260a7 100644 --- a/tests/generic.expect +++ b/tests/generic.expect @@ -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 + diff --git a/tests/test1.in b/tests/test1.in index b9db902a..cfea247a 100644 --- a/tests/test1.in +++ b/tests/test1.in @@ -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 |