diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/linux/i-bind.sh | 6 | ||||
| -rw-r--r-- | tests/linux/i-dscomplete.sh | 6 | ||||
| -rw-r--r-- | tests/linux/i-emacs.sh | 6 | ||||
| -rw-r--r-- | tests/linux/i-history.sh | 6 | ||||
| -rw-r--r-- | tests/linux/i-prompt-esc.sh | 6 | ||||
| -rw-r--r-- | tests/linux/i-prompt.sh | 6 | ||||
| -rw-r--r-- | tests/linux/i-vi.sh | 6 | ||||
| -rw-r--r-- | tests/tools/ptydrive.py | 5 |
8 files changed, 1 insertions, 46 deletions
diff --git a/tests/linux/i-bind.sh b/tests/linux/i-bind.sh index 6681701..8bbc872 100644 --- a/tests/linux/i-bind.sh +++ b/tests/linux/i-bind.sh @@ -1,11 +1,5 @@ # Interactive: `bind`, the key bindings of the BSD shells. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac PS1='$ ' ENV='' HISTFILE='' python3 "$TESTS/tools/ptydrive.py" "$TSH" <<'END' # -l lists what the editor can run send bind -l | grep -c up-history\r diff --git a/tests/linux/i-dscomplete.sh b/tests/linux/i-dscomplete.sh index d8b6d7a..14d5d44 100644 --- a/tests/linux/i-dscomplete.sh +++ b/tests/linux/i-dscomplete.sh @@ -3,12 +3,6 @@ # that is turned into real CSI work areas, PDS directory blocks and TIOT # entries, so this drives the same decoding the z/OS build uses. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac { echo "X SYS1" echo "SYS1.MACLIB" diff --git a/tests/linux/i-emacs.sh b/tests/linux/i-emacs.sh index b1d0eb4..465b583 100644 --- a/tests/linux/i-emacs.sh +++ b/tests/linux/i-emacs.sh @@ -1,11 +1,5 @@ # Interactive: the built-in editor in emacs mode. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac PS1='$ ' ENV='' HISTFILE='' python3 "$TESTS/tools/ptydrive.py" "$TSH" <<'END' # insert in the middle: ^A, ^F send echo one two\x01\x06\x06\x06\x06\x06X\r diff --git a/tests/linux/i-history.sh b/tests/linux/i-history.sh index 1e83d7b..4ac00d4 100644 --- a/tests/linux/i-history.sh +++ b/tests/linux/i-history.sh @@ -1,11 +1,5 @@ # Interactive: history, fc, ^R, HISTFILE. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac printf 'echo from-file\n' >hist PS1='$ ' ENV='' HISTFILE=$PWD/hist HISTSIZE=50 \ python3 "$TESTS/tools/ptydrive.py" "$TSH" <<'END' diff --git a/tests/linux/i-prompt-esc.sh b/tests/linux/i-prompt-esc.sh index 0169663..18efd07 100644 --- a/tests/linux/i-prompt-esc.sh +++ b/tests/linux/i-prompt-esc.sh @@ -8,12 +8,6 @@ # counts the title and the `(B` as text, keeps 7 columns too few, and the # redraw after ^A shows a shorter window than this expectation. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac python3 "$TESTS/tools/ptydrive.py" -c 16 "$TSH" <<'END' send PS1='\\e]0;t\x07\\e(B\\e[1;32mP\\e[0m> '\r expect P> diff --git a/tests/linux/i-prompt.sh b/tests/linux/i-prompt.sh index ffbd914..9a04f4f 100644 --- a/tests/linux/i-prompt.sh +++ b/tests/linux/i-prompt.sh @@ -1,11 +1,5 @@ # Interactive: prompts. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac mkdir here && cd here || exit 1 PS1='$ ' PS2='more> ' ENV='' HISTFILE='' HOME=$PWD \ python3 "$TESTS/tools/ptydrive.py" "$TSH" <<'END' diff --git a/tests/linux/i-vi.sh b/tests/linux/i-vi.sh index 4cb503f..7e1edaa 100644 --- a/tests/linux/i-vi.sh +++ b/tests/linux/i-vi.sh @@ -1,11 +1,5 @@ # Interactive: the built-in editor in vi mode. command -v python3 >/dev/null 2>&1 || exit 77 -# Keys, redraw and listings belong to the editor: libedit reads its keys -# from ~/.editrc and draws in its own way, so this one is the built-in -# editor's. tests/linux/i-complete covers the completion both share. -case $("$TSH" -c 'echo "$ZASH_EDITOR"' 2>/dev/null) in -libedit) exit 77 ;; -esac PS1='$ ' ENV='' HISTFILE='' python3 "$TESTS/tools/ptydrive.py" "$TSH" -o vi <<'END' send echo hello world\x1b0wcwBYE\x1b\r expect BYE world diff --git a/tests/tools/ptydrive.py b/tests/tools/ptydrive.py index ee1ebca..32503ee 100644 --- a/tests/tools/ptydrive.py +++ b/tests/tools/ptydrive.py @@ -90,9 +90,6 @@ def clean(data): for ln in data.split(b"\n"): parts = [p for p in ln.split(b"\r") if p] lines.append(parts[-1] if parts else b"") - data = b"\n".join(lines).replace(b"\x07", b"") - # A NUL written to a terminal puts nothing on the screen; libedit emits - # a run of them when it redraws a line after a completion. - return data.replace(b"\x00", b"") + return b"\n".join(lines).replace(b"\x07", b"") main() |
