name: "Interactive"
incompatible_configs: ["sh"]
cases:
- name: "Basic interactive test"
pty: true
ignore_stdout: true ignore_whitespace: true stdin: |
#expect-prompt
echo hi
#send:Enter
#expect:hi
#expect-prompt
#send:Ctrl+D
- name: "Simple tab completion"
skip: true pty: true
ignore_stdout: true
test_files:
- path: "test-file.txt"
contents: |
Hello, world.
stdin: |
#expect-prompt
cat test-file.
#send:Tab
#send:Enter
#expect:Hello, world.
#expect-prompt
#send:Ctrl+D
- name: "PROMPT_COMMAND"
ignore_stderr: true
args: ["-i"]
stdin: |
declare -a calls=()
command=0
PROMPT_COMMAND='calls+=("$command")'
command=first
command=second
command=third
unset PROMPT_COMMAND
declare -p calls