diff options
author | Steve Bennett <steveb@workware.net.au> | 2023-07-13 09:47:40 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-08-13 10:04:47 +1000 |
commit | 4cfe38ed16abf8a1dce94e450906ae81008f976e (patch) | |
tree | d82c8e4971bf025fd5d437617c99a322e37d8c74 /tests | |
parent | 28570844204707fc01a735104fc89284d9eae766 (diff) | |
download | jimtcl-lineedit-disable.zip jimtcl-lineedit-disable.tar.gz jimtcl-lineedit-disable.tar.bz2 |
fixes when line editing is disabledlineedit-disable
- Set jim::lineedit to indicate if line editing is configured
- Ensure that aio tty works even if line editing is disabled
- Skip some tests if line editing is not configured
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/history.test | 1 | ||||
-rw-r--r-- | tests/interactive.test | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/history.test b/tests/history.test index 9abf0ef..e0ff0e2 100644 --- a/tests/history.test +++ b/tests/history.test @@ -1,6 +1,7 @@ source [file dirname [info script]]/testing.tcl needs cmd {history save} +needs expr "jim::lineedit" {$jim::lineedit} test history-1.1 {history usage} -body { history diff --git a/tests/interactive.test b/tests/interactive.test index a853bc8..8d19512 100644 --- a/tests/interactive.test +++ b/tests/interactive.test @@ -3,6 +3,7 @@ source [file dirname [info script]]/testing.tcl needs constraint jim needs cmd socket needs eval "socket pty" {lmap p [socket pty] { $p close }} +constraint expr lineedit {$jim::lineedit} package require expect @@ -44,7 +45,7 @@ test interactive-1.1 {basic command} -body { wait-for-prompt $p } -test interactive-1.2 {command line completion} { +test interactive-1.2 {command line completion} lineedit { set check 0 set failed 0 $p send "li\t" @@ -62,7 +63,7 @@ test interactive-1.2 {command line completion} { list $check $failed } {3 0} -test interactive-1.3 {history show} -body { +test interactive-1.3 {history show} -constraints lineedit -body { $p send "history show\r" $p expect {\r\n} $p expect {history show\r\n} @@ -71,7 +72,7 @@ test interactive-1.3 {history show} -body { wait-for-prompt $p } -test interactive-1.4 {history getline} -body { +test interactive-1.4 {history getline} -constraints lineedit -body { $p send "history getline {PROMPT> }\r" $p expect {\r\n} sleep 0.25 @@ -83,7 +84,7 @@ test interactive-1.4 {history getline} -body { wait-for-prompt $p } -test interactive-1.4 {history getline} -body { +test interactive-1.5 {history getline} -constraints lineedit -body { $p send "set len \[history getline {PROMPT> } buf\]\r" $p expect {\r\n} sleep 0.25 @@ -100,7 +101,7 @@ test interactive-1.4 {history getline} -body { wait-for-prompt $p } -test interactive-1.5 {insert wide character} -constraints utf8 -body { +test interactive-1.6 {insert wide character} -constraints {utf8 lineedit} -body { $p send "set x a\u1100b" # now arrow left twice over the wide char and insert another char $p send \x1bOD @@ -115,7 +116,7 @@ test interactive-1.5 {insert wide character} -constraints utf8 -body { wait-for-prompt $p } -test interactive-1.6 {insert utf-8 combining character} -constraints utf8 -body { +test interactive-1.7 {insert utf-8 combining character} -constraints {utf8 lineedit} -body { $p send "set x x\u0300" # now arrow left twice over the combining char and "x" and insert another char $p send \x1bOD |