39 lines
977 B
JSON
39 lines
977 B
JSON
{
|
|
"schemaVersion": 1,
|
|
"description": "Regression snippets for Bare OS sed/awk engines; not a full POSIX conformance suite.",
|
|
"sed": [
|
|
{
|
|
"name": "substitute_first_per_line",
|
|
"file": "_corpus_sed1.txt",
|
|
"content": "foo bar\nbaz foo\n",
|
|
"argv": ["sed", "-e", "s/foo/FOO/", "_corpus_sed1.txt"],
|
|
"lines": ["FOO bar", "baz FOO"]
|
|
},
|
|
{
|
|
"name": "delete_matching_lines",
|
|
"file": "_corpus_sed2.txt",
|
|
"content": "keep\ndrop\nkeep2\n",
|
|
"argv": ["sed", "-e", "/drop/d", "_corpus_sed2.txt"],
|
|
"lines": ["keep", "keep2"]
|
|
}
|
|
],
|
|
"awk": [
|
|
{
|
|
"name": "begin_print_literal",
|
|
"argv": ["awk", "BEGIN{print 7}"],
|
|
"lines": ["7"]
|
|
},
|
|
{
|
|
"name": "begin_end_inline",
|
|
"file": "_corpus_awk2.txt",
|
|
"content": "x\n",
|
|
"argv": [
|
|
"awk",
|
|
"BEGIN{print \"start\"}END{print \"end\"}",
|
|
"_corpus_awk2.txt"
|
|
],
|
|
"lines": ["start", "end"]
|
|
}
|
|
]
|
|
}
|