Skip to content

Commit

Permalink
regression-test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Feb 17, 2024
1 parent f31908d commit b509cce
Show file tree
Hide file tree
Showing 24 changed files with 172 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0001/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify
Empty file.
17 changes: 17 additions & 0 deletions test/cases/verb-sparsify/0001/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5
},
{},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0002/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -f a
Empty file.
21 changes: 21 additions & 0 deletions test/cases/verb-sparsify/0002/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5,
"c": ""
},
{
"b": "",
"c": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0003/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -f b
Empty file.
21 changes: 21 additions & 0 deletions test/cases/verb-sparsify/0003/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5,
"c": ""
},
{
"a": "",
"c": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0004/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -f b,c
Empty file.
19 changes: 19 additions & 0 deletions test/cases/verb-sparsify/0004/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5
},
{
"a": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0005/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -s 1
Empty file.
21 changes: 21 additions & 0 deletions test/cases/verb-sparsify/0005/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5,
"c": ""
},
{
"a": "",
"b": "",
"c": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0006/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -f a -s 1
Empty file.
21 changes: 21 additions & 0 deletions test/cases/verb-sparsify/0006/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5,
"c": ""
},
{
"a": "",
"b": "",
"c": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0007/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -f b -s 1
Empty file.
22 changes: 22 additions & 0 deletions test/cases/verb-sparsify/0007/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5,
"c": ""
},
{
"a": "",
"b": "",
"c": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]
1 change: 1 addition & 0 deletions test/cases/verb-sparsify/0008/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --c2j --from test/input/sparsify-input.csv sparsify -f b,c -s 1
Empty file.
22 changes: 22 additions & 0 deletions test/cases/verb-sparsify/0008/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"b": 5,
"c": ""
},
{
"a": "",
"b": "",
"c": ""
},
{
"a": 7,
"b": 8,
"c": 9
}
]

0 comments on commit b509cce

Please sign in to comment.