mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
Add DCF (Debian Control Format) as supported file type (#1970)
* reader * record writer * pkg/output/record_writer_dcf.go * test/input/test.dcf * test/cases/io-dcf/ * pkg/cli/option_parse.go * make fmt * make dev * docs and `make dev`
This commit is contained in:
parent
a5f4c9d895
commit
daae7ff7f0
44 changed files with 579 additions and 29 deletions
1
test/cases/io-dcf/0001/cmd
Normal file
1
test/cases/io-dcf/0001/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --itsv --rs lf --odcf cat test/input/simple.tsv
|
||||
0
test/cases/io-dcf/0001/experr
Normal file
0
test/cases/io-dcf/0001/experr
Normal file
30
test/cases/io-dcf/0001/expout
Normal file
30
test/cases/io-dcf/0001/expout
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
a: pan
|
||||
b: pan
|
||||
i: 1
|
||||
x: 2
|
||||
y: 0.98994500
|
||||
|
||||
a: eks
|
||||
b: pan
|
||||
i: 2
|
||||
x: 1
|
||||
y: 0.77515900
|
||||
|
||||
a: wye
|
||||
b: wye
|
||||
i: 3
|
||||
x: 1
|
||||
y: 0.76164200
|
||||
|
||||
a: eks
|
||||
b: wye
|
||||
i: 4
|
||||
x: 5
|
||||
y: 0.32293400
|
||||
|
||||
a: wye
|
||||
b: pan
|
||||
i: 5
|
||||
x: 5
|
||||
y: 0.44828300
|
||||
|
||||
1
test/cases/io-dcf/0002/cmd
Normal file
1
test/cases/io-dcf/0002/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --icsv --odcf cat ${CASEDIR}/input
|
||||
0
test/cases/io-dcf/0002/experr
Normal file
0
test/cases/io-dcf/0002/experr
Normal file
4
test/cases/io-dcf/0002/expout
Normal file
4
test/cases/io-dcf/0002/expout
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
a: 1
|
||||
b: 2|3
|
||||
c: 4
|
||||
|
||||
2
test/cases/io-dcf/0002/input
Normal file
2
test/cases/io-dcf/0002/input
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
a,b,c
|
||||
1,2|3,4
|
||||
1
test/cases/io-dcf/0003/cmd
Normal file
1
test/cases/io-dcf/0003/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --idcf --odcf cat test/input/test.dcf
|
||||
0
test/cases/io-dcf/0003/experr
Normal file
0
test/cases/io-dcf/0003/experr
Normal file
10
test/cases/io-dcf/0003/expout
Normal file
10
test/cases/io-dcf/0003/expout
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Package: foo
|
||||
Version: 1.0
|
||||
Depends: libc6 (>= 2.0), libfoo (>= 1.2)
|
||||
Description: A test package.
|
||||
|
||||
Package: bar
|
||||
Version: 2.0
|
||||
Recommends: foo
|
||||
Description: Another package.
|
||||
|
||||
1
test/cases/io-dcf/dcf-input/cmd
Normal file
1
test/cases/io-dcf/dcf-input/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --idcf --ojson cat test/input/test.dcf
|
||||
0
test/cases/io-dcf/dcf-input/experr
Normal file
0
test/cases/io-dcf/dcf-input/experr
Normal file
14
test/cases/io-dcf/dcf-input/expout
Normal file
14
test/cases/io-dcf/dcf-input/expout
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[
|
||||
{
|
||||
"Package": "foo",
|
||||
"Version": "1.0",
|
||||
"Depends": ["libc6 (>= 2.0)", "libfoo (>= 1.2)"],
|
||||
"Description": "A test package."
|
||||
},
|
||||
{
|
||||
"Package": "bar",
|
||||
"Version": "2.0",
|
||||
"Recommends": ["foo"],
|
||||
"Description": "Another package."
|
||||
}
|
||||
]
|
||||
9
test/input/test.dcf
Normal file
9
test/input/test.dcf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Package: foo
|
||||
Version: 1.0
|
||||
Depends: libc6 (>= 2.0), libfoo (>= 1.2)
|
||||
Description: A test package.
|
||||
|
||||
Package: bar
|
||||
Version: 2.0
|
||||
Recommends: foo
|
||||
Description: Another package.
|
||||
Loading…
Add table
Add a link
Reference in a new issue