Skip to content

Commit

Permalink
Remove ruby dependency from mantests
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlangford authored and nicowilliams committed Feb 26, 2019
1 parent 175dbc4 commit 53a3f47
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions docs/build_mantests.py
Original file line number Diff line number Diff line change
@@ -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('')
2 changes: 1 addition & 1 deletion tests/mantest
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
. "${0%/*}/setup" "$@"

# 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

0 comments on commit 53a3f47

Please sign in to comment.