7
7
< body >
8
8
< h1 > Lux - LUcid eXpect scripting</ h1 >
9
9
10
- < p > Version 2.9.1 - 2023-10-25 </ p >
10
+ < p > Version 3.0 - 2024-08-21 </ p >
11
11
12
12
< ul >
13
13
< li > < a href ="#../README "> Introduction</ a > </ li >
@@ -1612,7 +1612,9 @@ <h3>Meta statements</h3>
1612
1612
refers to a log directory name unique for each test case. The
1613
1613
directory is however not automatically created. It must be created
1614
1614
by you in the test script if you want to use it. If you have created
1615
- the directory, it will turn up as a link in the annotated event log.</ p >
1615
+ the directory, it will turn up as a link in the annotated event log.
1616
+ The < strong > environment variable</ strong > < code > LUX_BIN</ code > is set to the directory where
1617
+ the < code > lux</ code > escript resides.</ p >
1616
1618
1617
1619
< p > < strong > [include FileName]</ strong > < br />
1618
1620
Includes and runs the specified script at this point. The < code > FileName</ code >
@@ -3066,8 +3068,11 @@ <h2>A failing test case</h2>
3066
3068
3067
3069
# Multi-line expect
3068
3070
"""?
3071
+ erl
3072
+ Erlang/OTP.*
3073
+
3069
3074
Eshell.*
3070
- $eprompt
3075
+ ${ eprompt}
3071
3076
"""
3072
3077
3073
3078
# Multi-line send
@@ -3084,7 +3089,7 @@ <h2>A failing test case</h2>
3084
3089
[timeout 2]
3085
3090
!5+13.
3086
3091
# Next line will fail
3087
- ?19
3092
+ ?expect_something_else_than_eighteen_will_fail
3088
3093
3089
3094
[cleanup]
3090
3095
# Save logs at fail
@@ -3198,55 +3203,37 @@ <h2>Warnings and avoiding failures</h2>
3198
3203
3199
3204
< blockquote >
3200
3205
< pre > < code > .../lux> lux examples
3201
- summary log : /Users/hmattsso /dev/lux/lux_logs/run_2023_10_25_13_33_18_81235 /lux_summary.log
3206
+ summary log : /Users/hawk /dev/lux/lux_logs/run_2024_08_21_13_55_22_491584 /lux_summary.log
3202
3207
test case : examples/calc.lux
3203
- progress : ..:...:.:...:..:.:.:....:.:..:.:..:..(....:..:.:.:.:.61????61)19
3204
- result : FAIL at line 19:61 in shell calc
3205
- expected*
3206
- \d+>\s.*\.
3207
- (.*)
3208
- \d+>\s
3209
- actual match_timeout
3210
-
3211
- [A[J1>
3212
- .. 2+1.
3213
- 3
3214
- 2>
3215
- diff
3216
- - \d+>\s.*\.
3217
- - (.*)
3218
- - \d+>\s
3219
- +
3220
- + [A[J1>
3221
- + .. 2+1.
3222
- + 3
3223
- + 2>
3224
-
3208
+ progress : ..:..:.:....:..:.:.:....:..:.:...(...:..:.:.:...2+1=3.)(.:..:..)...:..:..:..(.:..:..)..(.:..:..)(...:.:....3*4=12.)(.:.:...)..(.:..:..)......:..:........
3209
+ result : SUCCESS
3225
3210
test case : examples/fail.lux
3226
- progress : ..:..:..:.:...:.:.. :.:.:..:..:.:.:....:..:..32C.. :..: ..:..:..:.:.: .:.:.:.:.:.:.:.:.:.:.: .:.:.:.:.:.:.:.:.:.:.
3227
- result : FAIL at line 32 in shell calculator
3211
+ progress : ..:..:..:...:.. :.:.:..:..:.:.:.....:. :..35C ..:..:.:.. .:.:..:.:.:.:.:.:.:.:.:.:.
3212
+ result : FAIL at line 35 in shell calculator
3228
3213
expected*
3229
- 19
3214
+ expect_something_else_than_eighteen_will_fail
3230
3215
actual match_timeout
3231
3216
3232
3217
3> 5+13.
3218
+ [A[J3> 5+13.
3233
3219
18
3234
3220
4>
3235
3221
diff
3236
- - 19
3222
+ - expect_something_else_than_eighteen_will_fail
3237
3223
+
3238
3224
+ 3> 5+13.
3225
+ + [A[J3> 5+13.
3239
3226
+ 18
3240
3227
+ 4>
3241
3228
3242
3229
test case : examples/intro.lux
3243
- progress : ..:..:..:..:.:..: .... :..:..:.: ..:.:..:..:.:.. :.:..:.:..:.:.....:..:.:.:....c.:.....:..:.. :..:.:..:.:.. :.:..: .
3230
+ progress : ..:..:..:..:.:.....:..:.:. ..:.:..:.:.. :.:..:.:..:.:...... :..:.:.:....c.:.....:..:.:... :.:..:.. :.:..
3244
3231
result : SUCCESS
3245
3232
test case : examples/loop.lux
3246
- progress : ..:... :.:.((.:..:.:. )(.:.:..:. )(.:.:..:. ))((.. :.:.: .)(.:.:..:. )(.:..:.: .)(.:.:..:. )(.:.:..:. ))((.:.:..:. )(.. :.:.: .)(.:..:.: .)(.:..:. )(.:.:..:. )(.:.:..:. )(.:.:..:. )(.:..:. ))...:..:.:..:..:.:..:.:.. :.:..:.:... :... :.:.: .((.i=1..:..:. :.:..z)(z..i=2...:. :.:.:..z)(z..i=3..:..:.:.. z)(:...i=4..: .:.. :.):.). c........:..:..:. :..:..: .:.
3233
+ progress : ..:..:.:.. ((.:..:.)(.:.:..)(.:.:..))((.:.:..)(.:.:..)(.:.:. .)(.:.:..)(.:.:..))((.:.:..)(.:.:..)(.:.:. .)(.:.:.. )(.:.:..)(.:.:..)(.:.:..)(.:.:.. ))...:..:.:..:..:.:..:.. :.:.... :..:.:..((.i=1..:.:.. :.:..z)(z..i=2..:.. :.:.:..z)(z..i=3..:..:.:.:.. z)(:.z ..i=4...:.:.):).. c........:..:.:.. :..:.:. .:.
3247
3234
result : SUCCESS
3248
3235
test case : examples/loop_fail.lux
3249
- progress : ..:..:.. :.((.i=1..:..:.: ..z)(z..i=2..:... z)(z..i=3...: .:.:..z))+5
3236
+ progress : ..:..:.:.. :.((.i=1..:.:. ..z)(z..i=2..:..:.. z)(z..i=3..:. .:.:..z))+5
3250
3237
result : FAIL at line 5 in shell break
3251
3238
expected*
3252
3239
@@ -3260,7 +3247,7 @@ <h2>Warnings and avoiding failures</h2>
3260
3247
test case : examples/skip.lux
3261
3248
result : SKIP as variable TEST_SUNOS is not set
3262
3249
test case : examples/unstable_warn.lux
3263
- progress : ..:...:.: .:....7
3250
+ progress : ..:..:. .:....7
3264
3251
warning : 8: FAIL but UNSTABLE as variable TEST_DEVELOP is not set
3265
3252
result : WARNING at line 7 in shell foo
3266
3253
expected*
@@ -3275,19 +3262,18 @@ <h2>Warnings and avoiding failures</h2>
3275
3262
progress : W
3276
3263
warning : 3: Trailing whitespaces
3277
3264
result : WARNING
3278
- successful : 2
3265
+ successful : 3
3279
3266
skipped : 1
3280
- examples/skip.lux:6
3267
+ examples/skip.lux:6 - skip
3281
3268
warnings : 2
3282
3269
examples/unstable_warn.lux:8 - FAIL but UNSTABLE as variable TEST_DEVELOP is not set
3283
3270
examples/warning.lux:3 - Trailing whitespaces
3284
- failed : 4
3285
- examples/calc.lux:19:61 - match_timeout
3286
- examples/fail.lux:32 - match_timeout
3271
+ failed : 3
3272
+ examples/fail.lux:35 - match_timeout
3287
3273
examples/loop_fail.lux:5 - Loop ended without match of break pattern "THIS WILL NEVER MATCH"
3288
3274
examples/require_fail.lux:3 - FAIL as required variable YADA_MAKE is not set
3289
3275
summary : FAIL
3290
- file:///Users/hmattsso /dev/lux/lux_logs/run_2023_10_25_13_33_18_81235 /lux_summary.log.html
3276
+ file:///Users/hawk /dev/lux/lux_logs/run_2024_08_21_13_55_22_491584 /lux_summary.log.html
3291
3277
.../lux> echo $?
3292
3278
1
3293
3279
</ code > </ pre >
0 commit comments