Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gunther Klessinger committed Nov 16, 2016
1 parent 8e3718c commit 60d7c15
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ before_install:
- sudo python setup.py install

before_script:
- "export DISPLAY=:99.0"
- "echo 'starting'"

script: "./tests/run"

9 changes: 9 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Test runner

## building the expected results files
- execute `run build` to generate mdv output for all ".md" files within this folder.
- commit


## testing new mdv versions

- travis will execute `run` to diff the current mdv output with the expected
results


## Notes

Some day I'll make the line seps a bit smarter, e.g. min one line sep after lists
8 changes: 8 additions & 0 deletions tests/README.md.expected
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@

Test runner

 building the expected results files
 - execute run build to generate mdv output for all ".md" files within this
folder.
 - commit

 testing new mdv versions
 - travis will execute run to diff the current mdv output with the expected
results

 Notes
 Some day I'll make the line seps a bit smarter, e.g. min one line sep after
lists


22 changes: 22 additions & 0 deletions tests/nested_lists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Lists

- l1
- l2
- l3
- l4
- l5
- l2


> with sep2


* l1
* l2
* l3
* l4
* l5
* l2


17 changes: 17 additions & 0 deletions tests/nested_lists.md.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Lists
 - l1
 - l2
 - l3
 - l4
 - l5
 - l2
 with sep2
 - l1
 - l2
 - l3
 - l4
 - l5
 - l2


8 changes: 5 additions & 3 deletions tests/run
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ fi
set -e

mdv -h | grep Usage

res="/tmp/mdv_expected"
for f in *.md; do
echo "testing $f"
mdv $f > /tmp/mdv_expected
diff /tmp/mdv_expected "$f.expected" || { echo "failing: $f"; exit 1; }
mdv $f > $res
# why not:
cat $res
diff $res "$f.expected" || { echo "failing: $f"; exit 1; }
done

echo 'done'
Expand Down

0 comments on commit 60d7c15

Please sign in to comment.