Skip to content

Commit d9a1774

Browse files
committed
update test code.
1 parent 26e4298 commit d9a1774

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

demo/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ After connecting with `lssh --host LocalRcKeyAuth`, you can confirm that the wra
290290
# local_rc flag and generated functions
291291
demo_localrc_status
292292

293-
# lvim should show the demo statusline from ~/.demo_localrc/vimrc
294-
. ~/.demo_localrc/generated/lvim.sh && lvim "+set nomore" "+set statusline?" "+q"
293+
# lvim wrapper should be loaded in the remote shell
294+
declare -f lvim
295295

296296
# tmux should read ~/.demo_localrc/tmux.conf through ltmux
297297
tmux start-server \; show -gv status-left \; show-environment -g LSSH_DEMO_TMUX_CONF \; kill-server
@@ -300,7 +300,7 @@ tmux start-server \; show -gv status-left \; show-environment -g LSSH_DEMO_TMUX_
300300
Expected results:
301301

302302
- `demo_localrc_status` reports `lvim: ready` and `ltmux: ready`
303-
- `vim` prints `statusline=[demo-localrc] %f`
303+
- `declare -f lvim` prints a function body that runs `vim -u <(printf ...)`
304304
- `tmux` prints `[demo-localrc] ` and `LSSH_DEMO_TMUX_CONF=enabled`
305305

306306
If you edit `~/.demo_localrc/vimrc` or `~/.demo_localrc/tmux.conf`, run `update_lvim` and `update_ltmux` again before reconnecting so the generated wrapper files are refreshed.

demo/client/home/bin/demo-check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ lssh --host OverSocksProxy hostname
4343
echo "[11/12] local_rc functions should be available over lssh"
4444
lssh --host LocalRcKeyAuth 'type lvim >/dev/null && type ltmux >/dev/null && echo local_rc_ok'
4545

46-
echo "[12/12] generated vimrc wrapper should be usable on the remote host"
47-
lssh --host LocalRcKeyAuth '. ~/.demo_localrc/generated/lvim.sh && lvim "+set nomore" "+set statusline?" "+q" | tail -n 1'
46+
echo "[12/12] generated vimrc wrapper should be loaded on the remote host"
47+
lssh --host LocalRcKeyAuth 'declare -f lvim | grep -F "vim -u <(printf" && echo lvim_wrapper_ok'

demo/e2e_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ func TestDemoDockerComposeE2E(t *testing.T) {
9494
)
9595
})
9696

97-
t.Run("generated vim wrapper is usable", func(t *testing.T) {
97+
t.Run("generated vim wrapper is loaded", func(t *testing.T) {
9898
assertClientCommandContains(t, demoDir,
99-
`lssh --host LocalRcKeyAuth '. ~/.demo_localrc/generated/lvim.sh && lvim "+set nomore" "+set statusline?" "+q" | tail -n 1'`,
100-
"statusline=[demo-localrc]",
99+
`lssh --host LocalRcKeyAuth 'declare -f lvim | grep -F "vim -u <(printf" && echo lvim_wrapper_ok'`,
100+
"lvim_wrapper_ok",
101101
)
102102
})
103103
}

0 commit comments

Comments
 (0)