Skip to content

Commit 2042deb

Browse files
author
Håkan Mattsson
committed
Lux 3.0
1 parent 7888af0 commit 2042deb

File tree

3 files changed

+54
-82
lines changed

3 files changed

+54
-82
lines changed

doc/lux.md

+26-40
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Lux - LUcid eXpect scripting
22
============================
33

4-
Version 2.9.1 - 2023-10-25
4+
Version 3.0 - 2024-08-21
55

66
* [Introduction](#../README)
77
* [Concepts](#main_concepts)
@@ -1526,6 +1526,8 @@ refers to a log directory name unique for each test case. The
15261526
directory is however not automatically created. It must be created
15271527
by you in the test script if you want to use it. If you have created
15281528
the directory, it will turn up as a link in the annotated event log.
1529+
The **environment variable** `LUX_BIN` is set to the directory where
1530+
the `lux` escript resides.
15291531

15301532
**\[include FileName\]**
15311533
Includes and runs the specified script at this point. The `FileName`
@@ -2949,8 +2951,11 @@ Snippet from the enclosed `.../lux/examples/fail.lux` file:
29492951
>
29502952
> # Multi-line expect
29512953
> """?
2954+
> erl
2955+
> Erlang/OTP.*
2956+
>
29522957
> Eshell.*
2953-
> $eprompt
2958+
> ${eprompt}
29542959
> """
29552960
>
29562961
> # Multi-line send
@@ -2967,7 +2972,7 @@ Snippet from the enclosed `.../lux/examples/fail.lux` file:
29672972
> [timeout 2]
29682973
> !5+13.
29692974
> # Next line will fail
2970-
> ?19
2975+
> ?expect_something_else_than_eighteen_will_fail
29712976
>
29722977
> [cleanup]
29732978
> # Save logs at fail
@@ -3066,55 +3071,37 @@ Here follow the output from the enclosed example test suite under
30663071
Evaluate `lux examples`
30673072

30683073
> .../lux> lux examples
3069-
> summary log : /Users/hmattsso/dev/lux/lux_logs/run_2023_10_25_13_33_18_81235/lux_summary.log
3074+
> summary log : /Users/hawk/dev/lux/lux_logs/run_2024_08_21_13_55_22_491584/lux_summary.log
30703075
> test case : examples/calc.lux
3071-
> progress : ..:...:.:...:..:.:.:....:.:..:.:..:..(....:..:.:.:.:.61????61)19
3072-
> result : FAIL at line 19:61 in shell calc
3073-
> expected*
3074-
> \d+>\s.*\.
3075-
> (.*)
3076-
> \d+>\s
3077-
> actual match_timeout
3078-
>
3079-
> 1>
3080-
> .. 2+1.
3081-
> 3
3082-
> 2>
3083-
> diff
3084-
> - \d+>\s.*\.
3085-
> - (.*)
3086-
> - \d+>\s
3087-
> +
3088-
> + 1>
3089-
> + .. 2+1.
3090-
> + 3
3091-
> + 2>
3092-
>
3076+
> progress : ..:..:.:....:..:.:.:....:..:.:...(...:..:.:.:...2+1=3.)(.:..:..)...:..:..:..(.:..:..)..(.:..:..)(...:.:....3*4=12.)(.:.:...)..(.:..:..)......:..:........
3077+
> result : SUCCESS
30933078
> test case : examples/fail.lux
3094-
> progress : ..:..:..:.:...:.:..:.:.:..:..:.:.:....:..:..32C..:..:..:..:..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
3095-
> result : FAIL at line 32 in shell calculator
3079+
> progress : ..:..:..:...:..:.:.:..:..:.:.:.....:.:..35C..:..:.:...:.:..:.:.:.:.:.:.:.:.:.:.
3080+
> result : FAIL at line 35 in shell calculator
30963081
> expected*
3097-
> 19
3082+
> expect_something_else_than_eighteen_will_fail
30983083
> actual match_timeout
30993084
>
31003085
> 3> 5+13.
3086+
> 3> 5+13.
31013087
> 18
31023088
> 4>
31033089
> diff
3104-
> - 19
3090+
> - expect_something_else_than_eighteen_will_fail
31053091
> +
31063092
> + 3> 5+13.
3093+
> + 3> 5+13.
31073094
> + 18
31083095
> + 4>
31093096
>
31103097
> test case : examples/intro.lux
3111-
> progress : ..:..:..:..:.:..:....:..:..:.:..:.:..:..:.:..:.:..:.:..:.:.....:..:.:.:....c.:.....:..:..:..:.:..:.:..:.:..:.
3098+
> progress : ..:..:..:..:.:.....:..:.:...:.:..:.:..:.:..:.:..:.:......:..:.:.:....c.:.....:..:.:...:.:..:..:.:..
31123099
> result : SUCCESS
31133100
> test case : examples/loop.lux
3114-
> progress : ..:...:.:.((.:..:.:.)(.:.:..:.)(.:.:..:.))((..:.:.:.)(.:.:..:.)(.:..:.:.)(.:.:..:.)(.:.:..:.))((.:.:..:.)(..:.:.:.)(.:..:.:.)(.:..:.)(.:.:..:.)(.:.:..:.)(.:.:..:.)(.:..:.))...:..:.:..:..:.:..:.:..:.:..:.:...:...:.:.:.((.i=1..:..:.:.:..z)(z..i=2...:.:.:.:..z)(z..i=3..:..:.:..z)(:...i=4..:.:..:.):.).c........:..:..:.:..:..:.:.
3101+
> progress : ..:..:.:..((.:..:.)(.:.:..)(.:.:..))((.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..))((.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..))...:..:.:..:..:.:..:..:.:....:..:.:..((.i=1..:.:..:.:..z)(z..i=2..:..:.:.:..z)(z..i=3..:..:.:.:..z)(:.z..i=4...:.:.):)..c........:..:.:..:..:.:..:.
31153102
> result : SUCCESS
31163103
> test case : examples/loop_fail.lux
3117-
> progress : ..:..:..:.((.i=1..:..:.:..z)(z..i=2..:...z)(z..i=3...:.:.:..z))+5
3104+
> progress : ..:..:.:..:.((.i=1..:.:...z)(z..i=2..:..:..z)(z..i=3..:..:.:..z))+5
31183105
> result : FAIL at line 5 in shell break
31193106
> expected*
31203107
>
@@ -3128,7 +3115,7 @@ Evaluate `lux examples`
31283115
> test case : examples/skip.lux
31293116
> result : SKIP as variable TEST_SUNOS is not set
31303117
> test case : examples/unstable_warn.lux
3131-
> progress : ..:...:.:.:....7
3118+
> progress : ..:..:..:....7
31323119
> warning : 8: FAIL but UNSTABLE as variable TEST_DEVELOP is not set
31333120
> result : WARNING at line 7 in shell foo
31343121
> expected*
@@ -3143,19 +3130,18 @@ Evaluate `lux examples`
31433130
> progress : W
31443131
> warning : 3: Trailing whitespaces
31453132
> result : WARNING
3146-
> successful : 2
3133+
> successful : 3
31473134
> skipped : 1
3148-
> examples/skip.lux:6
3135+
> examples/skip.lux:6 - skip
31493136
> warnings : 2
31503137
> examples/unstable_warn.lux:8 - FAIL but UNSTABLE as variable TEST_DEVELOP is not set
31513138
> examples/warning.lux:3 - Trailing whitespaces
3152-
> failed : 4
3153-
> examples/calc.lux:19:61 - match_timeout
3154-
> examples/fail.lux:32 - match_timeout
3139+
> failed : 3
3140+
> examples/fail.lux:35 - match_timeout
31553141
> examples/loop_fail.lux:5 - Loop ended without match of break pattern "THIS WILL NEVER MATCH"
31563142
> examples/require_fail.lux:3 - FAIL as required variable YADA_MAKE is not set
31573143
> summary : FAIL
3158-
> file:///Users/hmattsso/dev/lux/lux_logs/run_2023_10_25_13_33_18_81235/lux_summary.log.html
3144+
> file:///Users/hawk/dev/lux/lux_logs/run_2024_08_21_13_55_22_491584/lux_summary.log.html
31593145
> .../lux> echo $?
31603146
> 1
31613147

lux.html

+27-41
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<body>
88
<h1>Lux - LUcid eXpect scripting</h1>
99

10-
<p>Version 2.9.1 - 2023-10-25</p>
10+
<p>Version 3.0 - 2024-08-21</p>
1111

1212
<ul>
1313
<li><a href="#../README">Introduction</a></li>
@@ -1612,7 +1612,9 @@ <h3>Meta statements</h3>
16121612
refers to a log directory name unique for each test case. The
16131613
directory is however not automatically created. It must be created
16141614
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>
16161618

16171619
<p><strong>[include FileName]</strong> <br />
16181620
Includes and runs the specified script at this point. The <code>FileName</code>
@@ -3066,8 +3068,11 @@ <h2>A failing test case</h2>
30663068

30673069
# Multi-line expect
30683070
"""?
3071+
erl
3072+
Erlang/OTP.*
3073+
30693074
Eshell.*
3070-
$eprompt
3075+
${eprompt}
30713076
"""
30723077

30733078
# Multi-line send
@@ -3084,7 +3089,7 @@ <h2>A failing test case</h2>
30843089
[timeout 2]
30853090
!5+13.
30863091
# Next line will fail
3087-
?19
3092+
?expect_something_else_than_eighteen_will_fail
30883093

30893094
[cleanup]
30903095
# Save logs at fail
@@ -3198,55 +3203,37 @@ <h2>Warnings and avoiding failures</h2>
31983203

31993204
<blockquote>
32003205
<pre><code>.../lux&gt; 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
32023207
test case : examples/calc.lux
3203-
progress : ..:...:.:...:..:.:.:....:.:..:.:..:..(....:..:.:.:.:.61????61)19
3204-
result : FAIL at line 19:61 in shell calc
3205-
expected*
3206-
\d+&gt;\s.*\.
3207-
(.*)
3208-
\d+&gt;\s
3209-
actual match_timeout
3210-
3211-
1&gt;
3212-
.. 2+1.
3213-
3
3214-
2&gt;
3215-
diff
3216-
- \d+&gt;\s.*\.
3217-
- (.*)
3218-
- \d+&gt;\s
3219-
+
3220-
+ 1&gt;
3221-
+ .. 2+1.
3222-
+ 3
3223-
+ 2&gt;
3224-
3208+
progress : ..:..:.:....:..:.:.:....:..:.:...(...:..:.:.:...2+1=3.)(.:..:..)...:..:..:..(.:..:..)..(.:..:..)(...:.:....3*4=12.)(.:.:...)..(.:..:..)......:..:........
3209+
result : SUCCESS
32253210
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
32283213
expected*
3229-
19
3214+
expect_something_else_than_eighteen_will_fail
32303215
actual match_timeout
32313216

32323217
3&gt; 5+13.
3218+
3&gt; 5+13.
32333219
18
32343220
4&gt;
32353221
diff
3236-
- 19
3222+
- expect_something_else_than_eighteen_will_fail
32373223
+
32383224
+ 3&gt; 5+13.
3225+
+ 3&gt; 5+13.
32393226
+ 18
32403227
+ 4&gt;
32413228

32423229
test case : examples/intro.lux
3243-
progress : ..:..:..:..:.:..:....:..:..:.:..:.:..:..:.:..:.:..:.:..:.:.....:..:.:.:....c.:.....:..:..:..:.:..:.:..:.:..:.
3230+
progress : ..:..:..:..:.:.....:..:.:...:.:..:.:..:.:..:.:..:.:......:..:.:.:....c.:.....:..:.:...:.:..:..:.:..
32443231
result : SUCCESS
32453232
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........:..:.:..:..:.:..:.
32473234
result : SUCCESS
32483235
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
32503237
result : FAIL at line 5 in shell break
32513238
expected*
32523239

@@ -3260,7 +3247,7 @@ <h2>Warnings and avoiding failures</h2>
32603247
test case : examples/skip.lux
32613248
result : SKIP as variable TEST_SUNOS is not set
32623249
test case : examples/unstable_warn.lux
3263-
progress : ..:...:.:.:....7
3250+
progress : ..:..:..:....7
32643251
warning : 8: FAIL but UNSTABLE as variable TEST_DEVELOP is not set
32653252
result : WARNING at line 7 in shell foo
32663253
expected*
@@ -3275,19 +3262,18 @@ <h2>Warnings and avoiding failures</h2>
32753262
progress : W
32763263
warning : 3: Trailing whitespaces
32773264
result : WARNING
3278-
successful : 2
3265+
successful : 3
32793266
skipped : 1
3280-
examples/skip.lux:6
3267+
examples/skip.lux:6 - skip
32813268
warnings : 2
32823269
examples/unstable_warn.lux:8 - FAIL but UNSTABLE as variable TEST_DEVELOP is not set
32833270
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
32873273
examples/loop_fail.lux:5 - Loop ended without match of break pattern "THIS WILL NEVER MATCH"
32883274
examples/require_fail.lux:3 - FAIL as required variable YADA_MAKE is not set
32893275
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
32913277
.../lux&gt; echo $?
32923278
1
32933279
</code></pre>

vsn.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# See the file "LICENSE" for information on usage and redistribution
44
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
55

6-
LUX_VSN=2.9.1
6+
LUX_VSN=3.0

0 commit comments

Comments
 (0)