Skip to content

Commit 32547bf

Browse files
committed
More tests
1 parent 15586b6 commit 32547bf

23 files changed

+7635
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
test/errlog
2+
test/outlog
3+
4+
# vi .swp files
5+
.*.swp

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: python
2+
3+
addons:
4+
apt:
5+
packages:
6+
- bash
7+
8+
# Whatever the current shebang, replace with hardcoded shell
9+
script: >
10+
./all-tests.sh

test/valid/api.github.com.argp1

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$.*

test/valid/api.github.com.argp2

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$..description

test/valid/api.github.com.json

+2,672
Large diffs are not rendered by default.

test/valid/api.github.com_argp1.parsed

+2,515
Large diffs are not rendered by default.
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[0,"description"] "Simple command-line tool for manipulating EC2 instances"
2+
[1,"description"] null
3+
[2,"description"] "Checks the 'Next Update' time for a number of CRL files using OpenSSL."
4+
[3,"description"] "Linux disk IO check. Reads /sys filesystem directly to query tps, read, write, avg. request size, avg. queue size and avg. wait time."
5+
[4,"description"] "Check if a file exists or does not exist."
6+
[5,"description"] "Nagios plugin to provide network interface statistics with some automatic configuration."
7+
[6,"description"] "Check the nagios configuration with 'nagios -v'."
8+
[7,"description"] "NetBackup latest backup status check by Policy name"
9+
[8,"description"] "Checks /var/log/messages for general puppet-agent problems. The status will not return to 'green' until the problem is fixed."
10+
[9,"description"] "Nagios plugin to check slab size usage as percent of total memory."
11+
[10,"description"] "Check that interfaces are in the state that the network admin requested them to be in in the cisco cli."
12+
[11,"description"] "Check that modules are in an ok state. Say exactly which module is in non-ok state otherwise. Tested on Cisco Nexus 7000 series switches."
13+
[12,"description"] "Check that 2 (or more) PSUs are present and working in a Cisco switch. Usually a removed PSU won't be noticed since there is no error to report (and someone might forget to replace it etc.)"
14+
[13,"description"] "Ubuntu running on Android, without rooting your phone"
15+
[14,"description"] "Docker binary builder, triggered from nsq messages."
16+
[15,"description"] "Small library and CLI tool to convert Docker images to ACI"
17+
[16,"description"] "gives a fake chroot environment"
18+
[17,"description"] "A quick and easy way to setup a RESTful JSON API"
19+
[18,"description"] "a pipeable JSON parser written in Bash"
20+
[19,"description"] "JSONPath processor written in Bash"
21+
[20,"description"] "Jenkins integration with GitHub pull requests"
22+
[21,"description"] "Distribute Nagios Host/Service Checks & Eventhandler with Gearman Queues. Host/Servicegroups affinity included. More information at: http://labs.consol.de/nagios/mod-gearman/"
23+
[22,"description"] null
24+
[23,"description"] "Nagios REST Interface"
25+
[24,"description"] "Add/Disable/Enable Monitoring of Servers using Nagrestconf and Puppet Facts"
26+
[25,"description"] "Google Go (golang) language bindings for querying the nagrestconf REST api."
27+
[26,"description"] "python API binding for mclarkson/nagrestconf"
28+
[27,"description"] "NagRestConf Query utility."
29+
[28,"description"] "A REST interface and GUI for running scripts."
30+
[29,"description"] "Obdi REST end points for accessing the AWS API"

test/valid/puppygifs.tumblr.com.argp1

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$.*

test/valid/puppygifs.tumblr.com.argp2

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$..[name,tags]

test/valid/puppygifs.tumblr.com.json

+1
Large diffs are not rendered by default.

test/valid/puppygifs.tumblr.com_argp1.parsed

+1,946
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
["tumblelog","name"] "puppygifs"
2+
["posts",0,"tumblelog","name"] "puppygifs"
3+
["posts",0,"tags",0] "animal"
4+
["posts",0,"tags",1] "animals"
5+
["posts",0,"tags",2] "puppy"
6+
["posts",0,"tags",3] "puppies"
7+
["posts",0,"tags",4] "pug"
8+
["posts",0,"tags",5] "pugs"
9+
["posts",0,"tags",6] "cute"
10+
["posts",0,"tags",7] "adorable"
11+
["posts",0,"tags",8] "beige"
12+
["posts",0,"tags",9] "grey"
13+
["posts",0,"tags",10] "cream"
14+
["posts",0,"tags",11] "lightbrown"
15+
["posts",1,"tumblelog","name"] "puppygifs"
16+
["posts",1,"tags",0] "puppy"
17+
["posts",1,"tags",1] "puppies"
18+
["posts",1,"tags",2] "bichon frise"
19+
["posts",1,"tags",3] "white"
20+
["posts",1,"tags",4] "cute"
21+
["posts",1,"tags",5] "adorable"
22+
["posts",1,"tags",6] "animal"
23+
["posts",1,"tags",7] "animals"
24+
["posts",2,"tumblelog","name"] "puppygifs"
25+
["posts",2,"tags",0] "animal"
26+
["posts",2,"tags",1] "animals"
27+
["posts",2,"tags",2] "puppy"
28+
["posts",2,"tags",3] "puppies"
29+
["posts",2,"tags",4] "keeshond"
30+
["posts",2,"tags",5] "gray"
31+
["posts",2,"tags",6] "cute"
32+
["posts",2,"tags",7] "adorable"
33+
["posts",3,"tumblelog","name"] "puppygifs"
34+
["posts",3,"tags",0] "animal"
35+
["posts",3,"tags",1] "animals"
36+
["posts",3,"tags",2] "puppy"
37+
["posts",3,"tags",3] "puppies"
38+
["posts",3,"tags",4] "chow chow"
39+
["posts",3,"tags",5] "blond"
40+
["posts",3,"tags",6] "cute"
41+
["posts",3,"tags",7] "adorable"
42+
["posts",4,"tumblelog","name"] "puppygifs"
43+
["posts",4,"tags",0] "animal"
44+
["posts",4,"tags",1] "animals"
45+
["posts",4,"tags",2] "puppy"
46+
["posts",4,"tags",3] "puppies"
47+
["posts",4,"tags",4] "pomeranian"
48+
["posts",4,"tags",5] "cute"
49+
["posts",4,"tags",6] "adorable"
50+
["posts",4,"tags",7] "cream"
51+
["posts",5,"tumblelog","name"] "puppygifs"
52+
["posts",5,"tags",0] "text post"
53+
["posts",6,"tumblelog","name"] "puppygifs"
54+
["posts",6,"tags",0] "animal"
55+
["posts",6,"tags",1] "animals"
56+
["posts",6,"tags",2] "puppy"
57+
["posts",6,"tags",3] "puppies"
58+
["posts",6,"tags",4] "dachshund"
59+
["posts",6,"tags",5] "brown"
60+
["posts",6,"tags",6] "brownblack"
61+
["posts",6,"tags",7] "cute"
62+
["posts",6,"tags",8] "adorable"
63+
["posts",7,"tumblelog","name"] "puppygifs"
64+
["posts",7,"tags",0] "i apologize for the quality"
65+
["posts",7,"tags",1] "puppy"
66+
["posts",7,"tags",2] "puppies"
67+
["posts",7,"tags",3] "animal"
68+
["posts",7,"tags",4] "animals"
69+
["posts",7,"tags",5] "cute"
70+
["posts",7,"tags",6] "adorable"
71+
["posts",7,"tags",7] "Irish Setter"
72+
["posts",7,"tags",8] "brown"
73+
["posts",8,"tumblelog","name"] "puppygifs"
74+
["posts",8,"tags",0] "animal"
75+
["posts",8,"tags",1] "animals"
76+
["posts",8,"tags",2] "puppy"
77+
["posts",8,"tags",3] "puppies"
78+
["posts",8,"tags",4] "Samoyed"
79+
["posts",8,"tags",5] "white"
80+
["posts",8,"tags",6] "cute"
81+
["posts",8,"tags",7] "adorable"
82+
["posts",9,"tumblelog","name"] "puppygifs"
83+
["posts",9,"tags",0] "animal"
84+
["posts",9,"tags",1] "animals"
85+
["posts",9,"tags",2] "puppy"
86+
["posts",9,"tags",3] "puppies"
87+
["posts",9,"tags",4] "brownblack"
88+
["posts",9,"tags",5] "Corgi"
89+
["posts",9,"tags",6] "cute"
90+
["posts",9,"tags",7] "adorable"
91+
["posts",10,"tumblelog","name"] "puppygifs"
92+
["posts",10,"tags",0] "animal"
93+
["posts",10,"tags",1] "animals"
94+
["posts",10,"tags",2] "puppy"
95+
["posts",10,"tags",3] "puppies"
96+
["posts",10,"tags",4] "Husky"
97+
["posts",10,"tags",5] "Siberian Husky"
98+
["posts",10,"tags",6] "cute"
99+
["posts",10,"tags",7] "adorable"
100+
["posts",10,"tags",8] "brown"
101+
["posts",10,"tags",9] "Laika"
102+
["posts",11,"tumblelog","name"] "puppygifs"
103+
["posts",11,"tags",0] "animal"
104+
["posts",11,"tags",1] "animals"
105+
["posts",11,"tags",2] "puppy"
106+
["posts",11,"tags",3] "puppies"
107+
["posts",11,"tags",4] "white"
108+
["posts",11,"tags",5] "maltese"
109+
["posts",11,"tags",6] "cute"
110+
["posts",11,"tags",7] "adorable"
111+
["posts",12,"tumblelog","name"] "puppygifs"
112+
["posts",12,"tags",0] "animal"
113+
["posts",12,"tags",1] "animals"
114+
["posts",12,"tags",2] "puppy"
115+
["posts",12,"tags",3] "puppies"
116+
["posts",12,"tags",4] "white"
117+
["posts",12,"tags",5] "shepherd"
118+
["posts",12,"tags",6] "swiss shepherd"
119+
["posts",12,"tags",7] "cute"
120+
["posts",12,"tags",8] "adorable"
121+
["posts",13,"tumblelog","name"] "puppygifs"
122+
["posts",13,"tags",0] "animal"
123+
["posts",13,"tags",1] "animals"
124+
["posts",13,"tags",2] "puppy"
125+
["posts",13,"tags",3] "puppies"
126+
["posts",13,"tags",4] "black"
127+
["posts",13,"tags",5] "cute"
128+
["posts",13,"tags",6] "adorable"
129+
["posts",13,"tags",7] "chihuahua"
130+
["posts",14,"tumblelog","name"] "puppygifs"
131+
["posts",14,"tags",0] "animal"
132+
["posts",14,"tags",1] "animals"
133+
["posts",14,"tags",2] "puppy"
134+
["posts",14,"tags",3] "puppies"
135+
["posts",14,"tags",4] "lightbrown"
136+
["posts",14,"tags",5] "cute"
137+
["posts",14,"tags",6] "adorable"
138+
["posts",14,"tags",7] "golden retriever"
139+
["posts",15,"tumblelog","name"] "puppygifs"
140+
["posts",15,"tags",0] "animal"
141+
["posts",15,"tags",1] "animals"
142+
["posts",15,"tags",2] "puppy"
143+
["posts",15,"tags",3] "puppies"
144+
["posts",15,"tags",4] "pug"
145+
["posts",15,"tags",5] "cute"
146+
["posts",15,"tags",6] "adorable"
147+
["posts",15,"tags",7] "cream"
148+
["posts",16,"tumblelog","name"] "puppygifs"
149+
["posts",16,"tags",0] "puppies"
150+
["posts",16,"tags",1] "puppy"
151+
["posts",16,"tags",2] "white"
152+
["posts",16,"tags",3] "cute"
153+
["posts",16,"tags",4] "adorable"
154+
["posts",16,"tags",5] "animal"
155+
["posts",16,"tags",6] "animals"
156+
["posts",16,"tags",7] "Shiba"
157+
["posts",17,"tumblelog","name"] "puppygifs"
158+
["posts",17,"tags",0] "animal"
159+
["posts",17,"tags",1] "animals"
160+
["posts",17,"tags",2] "puppy"
161+
["posts",17,"tags",3] "puppies"
162+
["posts",17,"tags",4] "white"
163+
["posts",17,"tags",5] "cute"
164+
["posts",17,"tags",6] "adorable"
165+
["posts",17,"tags",7] "shiba"
166+
["posts",18,"tumblelog","name"] "puppygifs"
167+
["posts",18,"tags",0] "animal"
168+
["posts",18,"tags",1] "animals"
169+
["posts",18,"tags",2] "puppy"
170+
["posts",18,"tags",3] "puppies"
171+
["posts",18,"tags",4] "lightbrown"
172+
["posts",18,"tags",5] "shiba"
173+
["posts",19,"tumblelog","name"] "puppygifs"
174+
["posts",19,"tags",0] "animal"
175+
["posts",19,"tags",1] "animals"
176+
["posts",19,"tags",2] "puppy"
177+
["posts",19,"tags",3] "puppies"
178+
["posts",19,"tags",4] "lightbrown"
179+
["posts",19,"tags",5] "shiba"

test/valid/swapi.co.argp1

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$.*

test/valid/swapi.co.argp2

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$..[name,hair_color]

test/valid/swapi.co.argp3

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$..["name","hair_color"]

test/valid/swapi.co.argp4

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$..[name,"hair_color"]

test/valid/swapi.co.argp5

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$..["name",hair_color]

test/valid/swapi.co.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"count":87,"next":"http://swapi.co/api/people/?page=2","previous":null,"results":[{"name":"Luke Skywalker","height":"172","mass":"77","hair_color":"blond","skin_color":"fair","eye_color":"blue","birth_year":"19BBY","gender":"male","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/2/","http://swapi.co/api/films/6/","http://swapi.co/api/films/3/","http://swapi.co/api/films/1/","http://swapi.co/api/films/7/"],"species":["http://swapi.co/api/species/1/"],"vehicles":["http://swapi.co/api/vehicles/14/","http://swapi.co/api/vehicles/30/"],"starships":["http://swapi.co/api/starships/12/","http://swapi.co/api/starships/22/"],"created":"2014-12-09T13:50:51.644000Z","edited":"2014-12-20T21:17:56.891000Z","url":"http://swapi.co/api/people/1/"},{"name":"C-3PO","height":"167","mass":"75","hair_color":"n/a","skin_color":"gold","eye_color":"yellow","birth_year":"112BBY","gender":"n/a","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/2/","http://swapi.co/api/films/5/","http://swapi.co/api/films/4/","http://swapi.co/api/films/6/","http://swapi.co/api/films/3/","http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/2/"],"vehicles":[],"starships":[],"created":"2014-12-10T15:10:51.357000Z","edited":"2014-12-20T21:17:50.309000Z","url":"http://swapi.co/api/people/2/"},{"name":"R2-D2","height":"96","mass":"32","hair_color":"n/a","skin_color":"white, blue","eye_color":"red","birth_year":"33BBY","gender":"n/a","homeworld":"http://swapi.co/api/planets/8/","films":["http://swapi.co/api/films/2/","http://swapi.co/api/films/5/","http://swapi.co/api/films/4/","http://swapi.co/api/films/6/","http://swapi.co/api/films/3/","http://swapi.co/api/films/1/","http://swapi.co/api/films/7/"],"species":["http://swapi.co/api/species/2/"],"vehicles":[],"starships":[],"created":"2014-12-10T15:11:50.376000Z","edited":"2014-12-20T21:17:50.311000Z","url":"http://swapi.co/api/people/3/"},{"name":"Darth Vader","height":"202","mass":"136","hair_color":"none","skin_color":"white","eye_color":"yellow","birth_year":"41.9BBY","gender":"male","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/2/","http://swapi.co/api/films/6/","http://swapi.co/api/films/3/","http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/1/"],"vehicles":[],"starships":["http://swapi.co/api/starships/13/"],"created":"2014-12-10T15:18:20.704000Z","edited":"2014-12-20T21:17:50.313000Z","url":"http://swapi.co/api/people/4/"},{"name":"Leia Organa","height":"150","mass":"49","hair_color":"brown","skin_color":"light","eye_color":"brown","birth_year":"19BBY","gender":"female","homeworld":"http://swapi.co/api/planets/2/","films":["http://swapi.co/api/films/2/","http://swapi.co/api/films/6/","http://swapi.co/api/films/3/","http://swapi.co/api/films/1/","http://swapi.co/api/films/7/"],"species":["http://swapi.co/api/species/1/"],"vehicles":["http://swapi.co/api/vehicles/30/"],"starships":[],"created":"2014-12-10T15:20:09.791000Z","edited":"2014-12-20T21:17:50.315000Z","url":"http://swapi.co/api/people/5/"},{"name":"Owen Lars","height":"178","mass":"120","hair_color":"brown, grey","skin_color":"light","eye_color":"blue","birth_year":"52BBY","gender":"male","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/5/","http://swapi.co/api/films/6/","http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/1/"],"vehicles":[],"starships":[],"created":"2014-12-10T15:52:14.024000Z","edited":"2014-12-20T21:17:50.317000Z","url":"http://swapi.co/api/people/6/"},{"name":"Beru Whitesun lars","height":"165","mass":"75","hair_color":"brown","skin_color":"light","eye_color":"blue","birth_year":"47BBY","gender":"female","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/5/","http://swapi.co/api/films/6/","http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/1/"],"vehicles":[],"starships":[],"created":"2014-12-10T15:53:41.121000Z","edited":"2014-12-20T21:17:50.319000Z","url":"http://swapi.co/api/people/7/"},{"name":"R5-D4","height":"97","mass":"32","hair_color":"n/a","skin_color":"white, red","eye_color":"red","birth_year":"unknown","gender":"n/a","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/2/"],"vehicles":[],"starships":[],"created":"2014-12-10T15:57:50.959000Z","edited":"2014-12-20T21:17:50.321000Z","url":"http://swapi.co/api/people/8/"},{"name":"Biggs Darklighter","height":"183","mass":"84","hair_color":"black","skin_color":"light","eye_color":"brown","birth_year":"24BBY","gender":"male","homeworld":"http://swapi.co/api/planets/1/","films":["http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/1/"],"vehicles":[],"starships":["http://swapi.co/api/starships/12/"],"created":"2014-12-10T15:59:50.509000Z","edited":"2014-12-20T21:17:50.323000Z","url":"http://swapi.co/api/people/9/"},{"name":"Obi-Wan Kenobi","height":"182","mass":"77","hair_color":"auburn, white","skin_color":"fair","eye_color":"blue-gray","birth_year":"57BBY","gender":"male","homeworld":"http://swapi.co/api/planets/20/","films":["http://swapi.co/api/films/2/","http://swapi.co/api/films/5/","http://swapi.co/api/films/4/","http://swapi.co/api/films/6/","http://swapi.co/api/films/3/","http://swapi.co/api/films/1/"],"species":["http://swapi.co/api/species/1/"],"vehicles":["http://swapi.co/api/vehicles/38/"],"starships":["http://swapi.co/api/starships/48/","http://swapi.co/api/starships/59/","http://swapi.co/api/starships/64/","http://swapi.co/api/starships/65/","http://swapi.co/api/starships/74/"],"created":"2014-12-10T16:16:29.192000Z","edited":"2014-12-20T21:17:50.325000Z","url":"http://swapi.co/api/people/10/"}]}

0 commit comments

Comments
 (0)