Skip to content

Commit

Permalink
Add test for mermaid-js#165
Browse files Browse the repository at this point in the history
  • Loading branch information
ghtyrant committed Sep 28, 2021
1 parent 52ec854 commit d14e22c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run-tests.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ for i in $(ls $INPUT_DATA/*.mmd); do cat $i | docker run -i -v $(pwd):/data $IMA
# Test if the CLI actually works (PDF)
for i in $(ls $INPUT_DATA/*.mmd); do docker run -v $(pwd):/data $IMAGETAG -i /data/$i -o /data/$i.pdf; done
for i in $(ls $INPUT_DATA/*.mmd); do cat $i | docker run -i -v $(pwd):/data $IMAGETAG -o /data/$i-stdin.pdf; done

# Test if mmdc crashes on Markdown files containing no mermaid charts
OUTPUT=$(docker run -v $(pwd):/data $IMAGETAG -i /data/test-positive/no-charts.md)
EXPECTED_OUTPUT="No mermaid charts found in Markdown input"
[[ "$OUTPUT" == "$EXPECTED_OUTPUT" ]] || echo "Expected output to be '$EXPECTED_OUTPUT', got '$OUTPUT'"

0 comments on commit d14e22c

Please sign in to comment.