mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Remove ruby dependency from mantests
This commit is contained in:
committed by
Nico Williams
parent
175dbc4e25
commit
53a3f47076
13
docs/build_mantests.py
Executable file
13
docs/build_mantests.py
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
with open("content/manual/manual.yml") as f:
|
||||||
|
manual = yaml.load(f)
|
||||||
|
for section in manual.get('sections', []):
|
||||||
|
for entry in section.get('entries', []):
|
||||||
|
for example in entry.get('examples', []):
|
||||||
|
print(example.get('program', '').replace('\n', ' '))
|
||||||
|
print(example.get('input', ''))
|
||||||
|
for s in example.get('output', []):
|
||||||
|
print(s)
|
||||||
|
print('')
|
@@ -3,5 +3,5 @@
|
|||||||
. "${0%/*}/setup" "$@"
|
. "${0%/*}/setup" "$@"
|
||||||
|
|
||||||
# We set PAGER because there's a mantest for `env` that uses it.
|
# We set PAGER because there's a mantest for `env` that uses it.
|
||||||
(cd $JQBASEDIR/docs && rake mantests) |
|
(cd $JQBASEDIR/docs && pipenv run python3 build_mantests.py) |
|
||||||
env PAGER=less $VALGRIND $Q $JQ -L "$mods" --run-tests
|
env PAGER=less $VALGRIND $Q $JQ -L "$mods" --run-tests
|
||||||
|
Reference in New Issue
Block a user