Luv_Ray
46b8b41e3f
Merge branch 'main' into fix-expr-syntex-error
2023-10-14 23:50:21 +08:00
Zhuoxun Yang
5b1755387f
tests/expr: test escape
2023-10-14 23:18:15 +08:00
Daniel Hofstetter
f6880bff8f
expr: test some invalid syntaxes
2023-10-14 14:58:41 +02:00
Zhuoxun Yang
40f05a331e
tests/expr: add tests for test_and
2023-10-14 01:58:53 +08:00
Zhuoxun Yang
e5d70d444a
tests/expr: format
2023-10-07 10:41:10 +08:00
Luv_Ray
7bf4b7f674
tests/expr: add tests in test_expr.rs
2023-10-07 00:42:04 +08:00
Zhuoxun Yang
5a732dd21a
tests/expr: add test expr 1 \| a / 5
2023-10-06 23:50:44 +08:00
Daniel Hofstetter
ff500d7d6f
expr: interpret numbers != 0 as true for | and &
2023-09-26 16:24:00 +02:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Daniel Hofstetter
6988eb7ec6
tests: expand wildcard imports
2023-03-20 15:32:35 +01:00
Terts Diepraam
44ea43f058
tests: remove status_code, which is the same as code_is
2023-01-01 17:25:59 +01:00
Roy Ivy III
737271de96
test/expr: add regex tests
2022-12-29 23:22:13 -06:00
Roy Ivy III
812d811ff6
test/expr: add simple value and EXIT_CODE tests
2022-12-29 22:49:02 -06:00
Roy Ivy III
be37e033be
test/expr: add more index testing of unicode strings
2022-12-29 22:49:02 -06:00
Roy Ivy III
8e7dbb0bf6
test/expr: add 'index' operator tests
2022-12-29 22:48:55 -06:00
Sylvestre Ledru
7225fb6c24
expr: Use chars().count() as we can have some multibytes chars
...
Partially fixes #3132
Fixes one of the test of tests/misc/expr-multibyte
2022-02-13 14:19:25 +01:00
Michael Debertol
d821719c67
expr: support arbitrary precision integers ( #2271 )
...
* expr: support arbitrary precision integers
Instead of i64s we now use BigInts for integer operations. This means
that no result or input can be out of range.
The representation of integer flags was changed from i64 to u8 to make
their intention clearer.
* expr: allow big numbers as arguments as well
Also adds some tests
* expr: use num-traits to check bigints for 0 and 1
* expr: remove obsolete refs
match ergonomics made these avoidable.
* formatting
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2021-05-29 23:25:23 +02:00
Yağız can Değirmenci
071899d24d
tests: delete 'error:' prefix from the tests
2021-05-26 02:45:53 +03:00
Michael Debertol
218f523e1b
expr: make substr infallible
...
Instead of returning an Err it should return the "null string"
(in our case that's the empty string) when the offset or length
is invalid.
2021-05-23 22:22:34 +02:00
Roy Ivy III
de0375f909
tests ~ reorganize tests
2020-06-01 18:30:04 -05:00