diff options
author | Andrey Kislyuk <kislyuk@gmail.com> | 2018-06-16 22:08:57 -0700 |
---|---|---|
committer | Andrey Kislyuk <kislyuk@gmail.com> | 2018-06-16 22:08:57 -0700 |
commit | 27c79c466231911b9625f3c211e09c9e4951d8ec (patch) | |
tree | 96c54b99dfc9d6f40dc5e3245b3ae5d8fd817c98 | |
parent | 549884ab3b2d5032037c2fdad5f580e5396899ce (diff) |
Cover more branches in test
-rwxr-xr-x | test/test.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test.py b/test/test.py index 2de54a6..b1865b6 100755 --- a/test/test.py +++ b/test/test.py @@ -49,6 +49,7 @@ class TestYq(unittest.TestCase): return result def test_yq(self): + self.run_yq("", ["--help"]) self.assertEqual(self.run_yq("{}", ["."]), "") self.assertEqual(self.run_yq("foo:\n bar: 1\n baz: {bat: 3}", [".foo.baz.bat"]), "") self.assertEqual(self.run_yq("[1, 2, 3]", ["--yaml-output", "-M", "."]), "- 1\n- 2\n- 3\n") @@ -129,7 +130,8 @@ class TestYq(unittest.TestCase): self.run_yq("", ["-x", ".a", self.fd_path(tf), self.fd_path(tf2)], input_format="xml"), '<b></b>\n<c></c>\n' ) - + err = "yq: Error converting JSON to XML: cannot represent non-object types at top level" + self.run_yq("[1]", ["-x", "."], expect_exit_codes=[err]) if __name__ == '__main__': unittest.main() |