#!/bin/bash
echo ======Testing markdown========
node bin/markdown test/test.md -h -s style.css -c cwjohan/node-redis-queue -t 'file $BASENAME in $DIRNAME' >test/markdown.html
result=`diff -q -w test/markdown-ref.html test/markdown.html`
if [ -z "$result" ]; then
  echo Passed
else
  echo Failed
  echo $result
  diff -w test/markdown-ref.html test/markdown.html
fi

echo
echo =======Testing github-markdown=========
node bin/github-markdown test/test.md -s style.css -c cwjohan/node-redis-queue -t 'file $BASENAME in $DIRNAME' >test/github-markdown.html
result=`diff -q -w test/github-markdown-ref.html test/github-markdown.html`
if [ -z "$result" ]; then
  echo Passed
else
  echo Failed
  echo $result
  diff -w test/github-markdown-ref.html test/github-markdown.html
fi

