mirror of
https://github.com/nushell/nushell.git
synced 2024-11-29 11:54:02 +01:00
add tests for to ndnuon
This commit is contained in:
parent
7b6d1acaee
commit
783f711e9f
@ -103,3 +103,17 @@ def from_ndnuon_single_object [] {
|
||||
def from_ndnuon_invalid_object [] {
|
||||
assert error { '{"a":1' | formats from ndnuon }
|
||||
}
|
||||
|
||||
#[test]
|
||||
def to_ndnuon_multiple_objects [] {
|
||||
let result = [{a:1},{a:2},{a:3},{a:4},{a:5},{a:6}] | formats to ndnuon | str trim
|
||||
let expect = test_data_multiline
|
||||
assert equal $result $expect "could not convert to NDNUON"
|
||||
}
|
||||
|
||||
#[test]
|
||||
def to_ndnuon_single_object [] {
|
||||
let result = [{a:1}] | formats to ndnuon | str trim
|
||||
let expect = "{a:1}"
|
||||
assert equal $result $expect "could not convert to NDNUON"
|
||||
}
|
||||
|
@ -103,3 +103,18 @@ def from_ndnuon_single_object [] {
|
||||
def from_ndnuon_invalid_object [] {
|
||||
assert error { '{"a":1' | formats from ndnuon }
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
def to_ndnuon_multiple_objects [] {
|
||||
let result = [{a:1},{a:2},{a:3},{a:4},{a:5},{a:6}] | formats to ndnuon | str trim
|
||||
let expect = test_data_multiline
|
||||
assert equal $result $expect "could not convert to NDNUON"
|
||||
}
|
||||
|
||||
#[test]
|
||||
def to_ndnuon_single_object [] {
|
||||
let result = [{a:1}] | formats to ndnuon | str trim
|
||||
let expect = "{a:1}"
|
||||
assert equal $result $expect "could not convert to NDNUON"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user