Test Subplot against reference subplots

The Subplot project

2021-05-08 15:16

1 Introduction

This document describes how we guard against accidental breaking changes in Subplot by running it against a curated set of subplot documents.

2 Subplot

2.1 Produce a PDF

given an installed subplot
given a clone of https://gitlab.com/subplot/subplot.git in src at bfbcaf9eedb9f2339494c3ee16d5761121631342
when I docgen subplot.md to test.pdf, in src
then file src/test.pdf exists

2.2 Produce HTML page

given an installed subplot
given a clone of https://gitlab.com/subplot/subplot.git in src at bfbcaf9eedb9f2339494c3ee16d5761121631342
when I docgen subplot.md to test.html, in src
when I run, in src, subplot docgen subplot.md -o subplot.html
then file src/test.html exists

2.3 Generate and run test program

given an installed subplot
given file run_test.sh
given a clone of https://gitlab.com/subplot/subplot.git in src at bfbcaf9eedb9f2339494c3ee16d5761121631342
when I run, in src, subplot codegen subplot.md -o test-inner.py
when I run bash run_test.sh
then command is successful

File: run_test.sh

#!/bin/bash

set -euo pipefail
python3 src/test-inner.py --log test-inner.log --env "PATH=$PATH" --env SUBPLOT_DIR=/