Add some cell path tests (#7563)

This commit is contained in:
Reilly Wood
2022-12-21 14:54:39 -08:00
committed by GitHub
parent 757d7479af
commit 05e07ddf5c
3 changed files with 101 additions and 0 deletions

View File

@ -2,6 +2,18 @@ use nu_test_support::fs::Stub::FileWithContent;
use nu_test_support::playground::Playground;
use nu_test_support::{nu, pipeline};
#[test]
fn simple_get_record() {
let actual = nu!(r#"({foo: 'bar'} | get foo) == "bar""#);
assert_eq!(actual.out, "true");
}
#[test]
fn simple_get_list() {
let actual = nu!(r#"([{foo: 'bar'}] | get foo) == [bar]"#);
assert_eq!(actual.out, "true");
}
#[test]
fn fetches_a_row() {
Playground::setup("get_test_1", |dirs, sandbox| {