type: Add missing newline

Otherwise this would print

    # Defined interactivelyfunction foo

for interactively defined functions.
This commit is contained in:
Fabian Homborg
2021-01-03 17:41:38 +01:00
parent 627fff7971
commit 85ba2ed790
2 changed files with 9 additions and 1 deletions

View File

@@ -56,3 +56,11 @@ expect_prompt("error: no-execute mode enabled and no script given. Exiting")
sendline("source; or echo failed")
expect_prompt("failed")
# See that `type` tells us the function was defined interactively.
sendline("function foo; end; type foo")
expect_str("foo is a function with definition\r\n")
expect_str("# Defined interactively\r\n")
expect_str("function foo")
expect_str("end")
expect_prompt()