@@ -3,6 +3,7 @@ source [file dirname [info script]]/testing.tcl
3
3
needs constraint jim
4
4
needs cmd socket
5
5
needs eval "socket pty" {lmap p [socket pty] { $p close }}
6
+ constraint expr lineedit {$jim::lineedit}
6
7
7
8
package require expect
8
9
@@ -44,7 +45,7 @@ test interactive-1.1 {basic command} -body {
44
45
wait-for-prompt $p
45
46
}
46
47
47
- test interactive-1.2 {command line completion} {
48
+ test interactive-1.2 {command line completion} lineedit {
48
49
set check 0
49
50
set failed 0
50
51
$p send "li\t"
@@ -62,7 +63,7 @@ test interactive-1.2 {command line completion} {
62
63
list $check $failed
63
64
} {3 0}
64
65
65
- test interactive-1.3 {history show} -body {
66
+ test interactive-1.3 {history show} -constraints lineedit - body {
66
67
$p send "history show\r"
67
68
$p expect {\r\n}
68
69
$p expect {history show\r\n}
@@ -71,7 +72,7 @@ test interactive-1.3 {history show} -body {
71
72
wait-for-prompt $p
72
73
}
73
74
74
- test interactive-1.4 {history getline} -body {
75
+ test interactive-1.4 {history getline} -constraints lineedit - body {
75
76
$p send "history getline {PROMPT> }\r"
76
77
$p expect {\r\n}
77
78
sleep 0.25
@@ -83,7 +84,7 @@ test interactive-1.4 {history getline} -body {
83
84
wait-for-prompt $p
84
85
}
85
86
86
- test interactive-1.4 {history getline} -body {
87
+ test interactive-1.5 {history getline} -constraints lineedit -body {
87
88
$p send "set len \[history getline {PROMPT> } buf\]\r"
88
89
$p expect {\r\n}
89
90
sleep 0.25
@@ -100,7 +101,7 @@ test interactive-1.4 {history getline} -body {
100
101
wait-for-prompt $p
101
102
}
102
103
103
- test interactive-1.5 {insert wide character} -constraints utf8 -body {
104
+ test interactive-1.6 {insert wide character} -constraints { utf8 lineedit} -body {
104
105
$p send "set x a\u1100b"
105
106
# now arrow left twice over the wide char and insert another char
106
107
$p send \x1bOD
@@ -115,7 +116,7 @@ test interactive-1.5 {insert wide character} -constraints utf8 -body {
115
116
wait-for-prompt $p
116
117
}
117
118
118
- test interactive-1.6 {insert utf-8 combining character} -constraints utf8 -body {
119
+ test interactive-1.7 {insert utf-8 combining character} -constraints { utf8 lineedit} -body {
119
120
$p send "set x x\u0300"
120
121
# now arrow left twice over the combining char and "x" and insert another char
121
122
$p send \x1bOD
0 commit comments