| cue import -o - -f -l "\(strings.ToLower(kind))" --list ./import1 |
| cmp stdout expect-stdout1 |
| |
| # Issue #368 |
| cue import -o - -f --list ./import2 |
| cmp stdout expect-stdout2 |
| |
| # Issue #369 |
| cue import --with-context -l '"\(path.Ext(filename))": data' ./import3/data.json |
| cmpenv import3/data.cue expect3 |
| -- expect-stdout1 -- |
| service: [{ |
| kind: "Service" |
| name: "booster" |
| }, { |
| kind: "Service" |
| name: """ |
| supplement |
| foo |
| """ |
| json: "[1, 2]" |
| }] |
| deployment: [{ |
| kind: "Deployment" |
| name: "booster" |
| replicas: 1 |
| }] |
| -- expect-stdout2 -- |
| [[{a: 1}], [{b: 2}]] |
| -- expect3 -- |
| ".json": [1] |
| -- import1/services.jsonl -- |
| { |
| "kind": "Service", |
| "name": "booster" |
| } |
| { |
| "kind": "Deployment", |
| "name": "booster", |
| "replicas": 1 |
| } |
| { |
| "kind": "Service", |
| "name": "supplement\nfoo", |
| "json": "[1, 2]" |
| } |
| -- import2/data.jsonl -- |
| [{"a": 1}] |
| [{"b": 2}] |
| -- import3/data.json -- |
| [1] |
| -- cue.mod -- |