diff options
Diffstat (limited to 'libtests/qtest')
-rw-r--r-- | libtests/qtest/json_handler.test | 17 | ||||
-rw-r--r-- | libtests/qtest/json_handler/json_handler.out | 22 |
2 files changed, 39 insertions, 0 deletions
diff --git a/libtests/qtest/json_handler.test b/libtests/qtest/json_handler.test new file mode 100644 index 00000000..6df51fc1 --- /dev/null +++ b/libtests/qtest/json_handler.test @@ -0,0 +1,17 @@ +#!/usr/bin/env perl +require 5.008; +use warnings; +use strict; + +chdir("json_handler") or die "chdir testdir failed: $!\n"; + +require TestDriver; + +my $td = new TestDriver('json_handler'); + +$td->runtest("JSON handler", + {$td->COMMAND => "json_handler"}, + {$td->FILE => "json_handler.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + +$td->report(1); diff --git a/libtests/qtest/json_handler/json_handler.out b/libtests/qtest/json_handler/json_handler.out new file mode 100644 index 00000000..13554af3 --- /dev/null +++ b/libtests/qtest/json_handler/json_handler.out @@ -0,0 +1,22 @@ +-- scalar -- +.: string: potato +-- all -- +.five[0]: string: x +.five[1]: bool: false +.five[2]: string: y +.five[3]: null +.five[4]: bool: true +.four: json: [ + "a", + 1 +] +.one: string: potato +.phour: json: null +.six.a.Q: json: "baaa" +.six.a.b: string: quack +.six.b: string: moo +.three: bool: true +.two: number: 3.14 +-- errors -- +bad type at top: JSON handler: value at . is not of expected type +unexpected key: JSON handler found unexpected key x in object at . |