diff --git a/bjo.lock b/bjo.lock index c7c46bb..764d31a 100644 --- a/bjo.lock +++ b/bjo.lock @@ -1,5 +1,5 @@ (lock (locked - (package (name (bjoterm)) (version "0.2.1") + (package (name (bjoterm)) (version "0.2.2") (source (git (url "https://rikspucko.koketteriet.se/bjoli/bjoterm.git"))) - (commit "702fcedf2d1536ffb4a3e04e9be6fd1417d18e9db299d70d0a36e746fdc047da")))) + (commit "4eef978b6b7862a2ac0901539d3e46c56db49d4ef4c502e8ca62960a8e4b3a85")))) diff --git a/manifest.bjodat b/manifest.bjodat index 4fd6f36..94e25d7 100644 --- a/manifest.bjodat +++ b/manifest.bjodat @@ -10,5 +10,5 @@ ;; The line editor and the terminal. To work on both at once, use ;; (source (path (dir "../bjoterm"))) instead. (package (name (bjoterm)) - (version (version-at-least "0.2.1")) + (version (version-at-least "0.2.2")) (source (git (url "https://rikspucko.koketteriet.se/bjoli/bjoterm.git")))))) diff --git a/tests/interactive.bjo b/tests/interactive.bjo index bea54a5..a5f38cf 100644 --- a/tests/interactive.bjo +++ b/tests/interactive.bjo @@ -65,7 +65,8 @@ "printf 'fromrc\\r'" "sleep 0.5" "printf 'sleep 0.5 &\\r'" "sleep 0.3" "printf 'ec'" "sleep 1.5" "printf 'ho typed\\r'" "sleep 0.5" "printf '/usr/\\r'" "sleep 0.3" "printf 'pwd\\r'" "sleep 0.3" - (str "printf 'ls " state "/tabs/a\\t'") "sleep 0.5" "printf '\\003'" "sleep 0.3" + (str "printf 'cd " state "/tabs/a\\t'") "sleep 0.5" "printf '\\t'" "sleep 0.3" + "printf '\\t\\r'" "sleep 0.3" "printf '\\r'" "sleep 0.3" "printf 'pwd\\r'" "sleep 0.3" "printf 'cd /tmp\\r'" "sleep 0.3" "printf \"PROMPT='<\\\\W \\$(echo s)>\\\\$ '\\r\"" "sleep 0.5" "printf 'exit\\r'" "sleep 1"] @@ -82,8 +83,10 @@ (expect-true "with status 130" (string-contains? out "status 130")) (expect-true "Ctrl-Z at the prompt does not stop the shell" (string-contains? out "\nalive\n")) (expect-true "a directory alone changes to it" (string-contains? out "pwd\n/usr\n")) - (expect-true "Tab lists the candidates when it can insert nothing" - (and (string-contains? out "tabs/alpha/") (string-contains? out "tabs/apple/"))) + (expect-true "Tab shows a menu of the candidates when it can insert nothing, without their directory" + (string-contains? out "\nalpha/ apple/")) + (expect-true "and Tab chooses them in turn" + (string-contains? out (str "\n" state "/tabs/apple\n"))) (expect-true "jobs in a pipe" (string-contains? out "jobs | g command\nsleep 30\n")) (expect-true "history in a pipe, with this line last" (string-contains? out "history | tl 1 | g line\nhistory | tl 1 | g line\n"))