From 2042deb9dabb754889648b023a9b8ebe3a8ce09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Mattsson?= Date: Wed, 21 Aug 2024 15:39:35 +0200 Subject: [PATCH] Lux 3.0 --- doc/lux.md | 66 +++++++++++++++++++++------------------------------- lux.html | 68 ++++++++++++++++++++++-------------------------------- vsn.mk | 2 +- 3 files changed, 54 insertions(+), 82 deletions(-) diff --git a/doc/lux.md b/doc/lux.md index 1c78e3f4..0a2bd2f0 100644 --- a/doc/lux.md +++ b/doc/lux.md @@ -1,7 +1,7 @@ Lux - LUcid eXpect scripting ============================ -Version 2.9.1 - 2023-10-25 +Version 3.0 - 2024-08-21 * [Introduction](#../README) * [Concepts](#main_concepts) @@ -1526,6 +1526,8 @@ refers to a log directory name unique for each test case. The directory is however not automatically created. It must be created by you in the test script if you want to use it. If you have created the directory, it will turn up as a link in the annotated event log. +The **environment variable** `LUX_BIN` is set to the directory where +the `lux` escript resides. **\[include FileName\]** Includes and runs the specified script at this point. The `FileName` @@ -2949,8 +2951,11 @@ Snippet from the enclosed `.../lux/examples/fail.lux` file: > > # Multi-line expect > """? +> erl +> Erlang/OTP.* +> > Eshell.* -> $eprompt +> ${eprompt} > """ > > # Multi-line send @@ -2967,7 +2972,7 @@ Snippet from the enclosed `.../lux/examples/fail.lux` file: > [timeout 2] > !5+13. > # Next line will fail -> ?19 +> ?expect_something_else_than_eighteen_will_fail > > [cleanup] > # Save logs at fail @@ -3066,55 +3071,37 @@ Here follow the output from the enclosed example test suite under Evaluate `lux examples` > .../lux> lux examples -> summary log : /Users/hmattsso/dev/lux/lux_logs/run_2023_10_25_13_33_18_81235/lux_summary.log +> summary log : /Users/hawk/dev/lux/lux_logs/run_2024_08_21_13_55_22_491584/lux_summary.log > test case : examples/calc.lux -> progress : ..:...:.:...:..:.:.:....:.:..:.:..:..(....:..:.:.:.:.61????61)19 -> result : FAIL at line 19:61 in shell calc -> expected* -> \d+>\s.*\. -> (.*) -> \d+>\s -> actual match_timeout -> -> 1> -> .. 2+1. -> 3 -> 2> -> diff -> - \d+>\s.*\. -> - (.*) -> - \d+>\s -> + -> + 1> -> + .. 2+1. -> + 3 -> + 2> -> +> progress : ..:..:.:....:..:.:.:....:..:.:...(...:..:.:.:...2+1=3.)(.:..:..)...:..:..:..(.:..:..)..(.:..:..)(...:.:....3*4=12.)(.:.:...)..(.:..:..)......:..:........ +> result : SUCCESS > test case : examples/fail.lux -> progress : ..:..:..:.:...:.:..:.:.:..:..:.:.:....:..:..32C..:..:..:..:..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. -> result : FAIL at line 32 in shell calculator +> progress : ..:..:..:...:..:.:.:..:..:.:.:.....:.:..35C..:..:.:...:.:..:.:.:.:.:.:.:.:.:.:. +> result : FAIL at line 35 in shell calculator > expected* -> 19 +> expect_something_else_than_eighteen_will_fail > actual match_timeout > > 3> 5+13. +> 3> 5+13. > 18 > 4> > diff -> - 19 +> - expect_something_else_than_eighteen_will_fail > + > + 3> 5+13. +> + 3> 5+13. > + 18 > + 4> > > test case : examples/intro.lux -> progress : ..:..:..:..:.:..:....:..:..:.:..:.:..:..:.:..:.:..:.:..:.:.....:..:.:.:....c.:.....:..:..:..:.:..:.:..:.:..:. +> progress : ..:..:..:..:.:.....:..:.:...:.:..:.:..:.:..:.:..:.:......:..:.:.:....c.:.....:..:.:...:.:..:..:.:.. > result : SUCCESS > test case : examples/loop.lux -> progress : ..:...:.:.((.:..:.:.)(.:.:..:.)(.:.:..:.))((..:.:.:.)(.:.:..:.)(.:..:.:.)(.:.:..:.)(.:.:..:.))((.:.:..:.)(..:.:.:.)(.:..:.:.)(.:..:.)(.:.:..:.)(.:.:..:.)(.:.:..:.)(.:..:.))...:..:.:..:..:.:..:.:..:.:..:.:...:...:.:.:.((.i=1..:..:.:.:..z)(z..i=2...:.:.:.:..z)(z..i=3..:..:.:..z)(:...i=4..:.:..:.):.).c........:..:..:.:..:..:.:. +> progress : ..:..:.:..((.:..:.)(.:.:..)(.:.:..))((.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..))((.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..)(.:.:..))...:..:.:..:..:.:..:..:.:....:..:.:..((.i=1..:.:..:.:..z)(z..i=2..:..:.:.:..z)(z..i=3..:..:.:.:..z)(:.z..i=4...:.:.):)..c........:..:.:..:..:.:..:. > result : SUCCESS > test case : examples/loop_fail.lux -> progress : ..:..:..:.((.i=1..:..:.:..z)(z..i=2..:...z)(z..i=3...:.:.:..z))+5 +> progress : ..:..:.:..:.((.i=1..:.:...z)(z..i=2..:..:..z)(z..i=3..:..:.:..z))+5 > result : FAIL at line 5 in shell break > expected* > @@ -3128,7 +3115,7 @@ Evaluate `lux examples` > test case : examples/skip.lux > result : SKIP as variable TEST_SUNOS is not set > test case : examples/unstable_warn.lux -> progress : ..:...:.:.:....7 +> progress : ..:..:..:....7 > warning : 8: FAIL but UNSTABLE as variable TEST_DEVELOP is not set > result : WARNING at line 7 in shell foo > expected* @@ -3143,19 +3130,18 @@ Evaluate `lux examples` > progress : W > warning : 3: Trailing whitespaces > result : WARNING -> successful : 2 +> successful : 3 > skipped : 1 -> examples/skip.lux:6 +> examples/skip.lux:6 - skip > warnings : 2 > examples/unstable_warn.lux:8 - FAIL but UNSTABLE as variable TEST_DEVELOP is not set > examples/warning.lux:3 - Trailing whitespaces -> failed : 4 -> examples/calc.lux:19:61 - match_timeout -> examples/fail.lux:32 - match_timeout +> failed : 3 +> examples/fail.lux:35 - match_timeout > examples/loop_fail.lux:5 - Loop ended without match of break pattern "THIS WILL NEVER MATCH" > examples/require_fail.lux:3 - FAIL as required variable YADA_MAKE is not set > summary : FAIL -> file:///Users/hmattsso/dev/lux/lux_logs/run_2023_10_25_13_33_18_81235/lux_summary.log.html +> file:///Users/hawk/dev/lux/lux_logs/run_2024_08_21_13_55_22_491584/lux_summary.log.html > .../lux> echo $? > 1 diff --git a/lux.html b/lux.html index 8f37b080..9f949f9b 100644 --- a/lux.html +++ b/lux.html @@ -7,7 +7,7 @@

Lux - LUcid eXpect scripting

-

Version 2.9.1 - 2023-10-25

+

Version 3.0 - 2024-08-21