File: test-docs.sh

package info (click to toggle)
vg 1.30.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 267,848 kB
  • sloc: cpp: 446,974; ansic: 116,148; python: 22,805; cs: 17,888; javascript: 11,031; sh: 5,866; makefile: 4,039; java: 1,415; perl: 1,303; xml: 442; lisp: 242
file content (22 lines) | stat: -rwxr-xr-x 597 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# test-docs.sh: Test the examples in the vg documentation and wiki with https://github.com/anko/txm
set -e

# Work out where we are.
# See https://stackoverflow.com/a/246128
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

# Make sure we have the tester
which txm || npm install -g txm

# Go to the test directory, where the tests expect to run
cd "${HERE}/../test"

# Test the readme
echo txm --jobs 1 "${HERE}/../README.md"
txm --jobs 1 "${HERE}/../README.md"

# Run all the wiki tests
find "${HERE}/wiki" -name "*.md" | xargs -n 1 -t txm --jobs 1