mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
Document and unit-test regex-capture reset logic (#1451)
* mlr --norc cat was erroring * Document and unit-test regex-capture reset logic
This commit is contained in:
parent
b13adbe6c0
commit
4706b4bb78
5 changed files with 61 additions and 0 deletions
1
test/cases/dsl-regex-matching/null-reset/cmd
Normal file
1
test/cases/dsl-regex-matching/null-reset/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-regex-matching/null-reset/experr
Normal file
0
test/cases/dsl-regex-matching/null-reset/experr
Normal file
9
test/cases/dsl-regex-matching/null-reset/expout
Normal file
9
test/cases/dsl-regex-matching/null-reset/expout
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[\1]:[\2]
|
||||
true
|
||||
[]:[]
|
||||
true
|
||||
[a]:[c]
|
||||
false
|
||||
[]:[]
|
||||
null
|
||||
[\1]:[\2]
|
||||
11
test/cases/dsl-regex-matching/null-reset/mlr
Normal file
11
test/cases/dsl-regex-matching/null-reset/mlr
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
end {
|
||||
print("[\1]:[\2]");
|
||||
print("abc" =~ "...");
|
||||
print("[\1]:[\2]");
|
||||
print("abc" =~ "(.).(.)");
|
||||
print("[\1]:[\2]");
|
||||
print("abc" =~ "(.)x(.)");
|
||||
print("[\1]:[\2]");
|
||||
print("abc" =~ null);
|
||||
print("[\1]:[\2]");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue