Skip to content

Commit

Permalink
move cue tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Worm <tony@hofstadter.io>
  • Loading branch information
verdverm committed Oct 16, 2021
1 parent 3cb1390 commit f436376
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 1 deletion.
29 changes: 29 additions & 0 deletions test/cli/testdata/pick_006.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
exec cuetils pick pick.cue tree.json
cmp stdout golden.stdout

-- pick.cue --
{
tree: {
cow: string
}
}
-- tree.json --
{
"tree": {
"a": {
"foo": "bar",
"a": {
"b": {
"c": "d"
}
}
},
"cow": "moo"
}
}
-- golden.stdout --
{
tree: {
cow: "moo"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 25 additions & 1 deletion structural/tests/pick.cue → test/cue/pick.cue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,30 @@ pick_tests: [
}
}
same: #real & #pick
}
},
{
x: {
c: {
a: "a"
b: "b"
c: {
a: "a"
b: "b"
}
}
}
p: {
c: {
a: _
}
}
#pick: (st.#Pick & { #X: x, #P: p }).pick
#real: {
c: {
a: "a"
}
}
same: #real & #pick
},
]

File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions test/pick.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
tree: {
a: {
a: _
}
}
}
14 changes: 14 additions & 0 deletions test/tree.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tree": {
"a": {
"foo": "bar",
"a": {
"b": {
"c": "d"
}
}
},
"cow": "moo"
}
}

0 comments on commit f436376

Please sign in to comment.