mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-03 15:47:47 +00:00
Deprecate the nu_scripts
version of stdlib-candidate
(#1042)
Deprecates the existing `stdlib-candidate` directories in `nu_scripts` since `std-rfc` has now transitioned to the main repo. Updates readme and renamed directories.
This commit is contained in:
parent
a31f8490fb
commit
5869e0b529
53 changed files with 18 additions and 40 deletions
|
@ -0,0 +1,20 @@
|
|||
use std assert
|
||||
use ../std-rfc record
|
||||
|
||||
export def "test list_merge" [] {
|
||||
assert equal ([{a:1} {b:2} {c:3} {d:4}] | record list merge) {a:1 b:2 c:3 d:4}
|
||||
}
|
||||
|
||||
export def "test filter-name predicate" [] {
|
||||
assert equal ({aa:1 ab:2 ba:3 bb:4 ca:5 cb:6} | record filter-name predicate {$in | str contains a}) {aa:1 ab:2 ba:3 ca:5}
|
||||
}
|
||||
|
||||
export def "test filter-name text" [] {
|
||||
assert equal ({aa:1 ab:2 ba:3 bb:4 ca:5 cb:6} | record filter-name text a) {aa:1 ab:2 ba:3 ca:5}
|
||||
assert equal ({aa:1 ab:2 ba:3 bb:4 ca:5 cb:6} | record filter-name text -r ^a) {aa:1 ab:2}
|
||||
assert equal ({aa:1 ab:2 ba:3 bb:4 ca:5 cb:6} | record filter-name text -r ^A) {}
|
||||
}
|
||||
|
||||
export def "test filter-value predicate" [] {
|
||||
assert equal ({aa:1 ab:2 ba:3 bb:4 ca:5 cb:6} | record filter-value predicate { $in mod 2 == 0 }) {ab:2 bb:4 cb:6}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue