Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
should
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
should
Commits
ab0e1d20
Commit
ab0e1d20
authored
Aug 07, 2020
by
Thonier
Committed by
Mathieu Giraud
Aug 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo/json.should: we should be able to test elements in nested lists
Reworked from examples by
@flothoni
. See
#54
.
parent
c7564848
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
demo/json.should
demo/json.should
+3
-2
demo/tests/concepts.json
demo/tests/concepts.json
+1
-1
No files found.
demo/json.should
View file @
ab0e1d20
...
...
@@ -13,6 +13,8 @@ j:concepts.directions
j:concepts.wuxing.earth
j0:concepts.winds
j:numbers[3].meaning
j:numbers[4][0]
j0:numbers[4][4]
j0:numbers[0].meaning
j0:numbers[42].meaning
...
...
@@ -28,6 +30,7 @@ j:concepts.directions:rth
j:concepts.directions[0]:rth
j0:concepts.directions[3]:rth
j0:concepts.wuxing:st
j:numbers[4][1]:0.8
$ The number of matching expressions can also be tested
j2:concepts.directions:st
...
...
@@ -42,5 +45,3 @@ jr>1:concepts.directions:e.*?st
$ Data that are not parsed as json yield 0 occurrences
echo "hello, world"
j0:hello
demo/tests/concepts.json
View file @
ab0e1d20
{
"numbers"
:
[
3
,
7
,
12
,
{
"meaning"
:
42
}
],
"numbers"
:
[
3
,
7
,
12
,
{
"meaning"
:
42
}
,
[
0
,
0.8
]
],
"concepts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment