Skip to content

Commit

Permalink
markdown: refactor tests to use input/golden files (shurcooL#45)
Browse files Browse the repository at this point in the history
Refactor the test cases into input/golden files to make it easier
to view and modify them.

New test cases can now be defined by adding a pair of files inside
the testdata directory: an input file (*.in.md) and a corresponding
golden file (*.golden.md).

Add an -update flag that writes current output to *.golden.md files.
  • Loading branch information
dmitshur committed Mar 11, 2019
2 parents 5ba28a0 + 489def5 commit 0ad3159
Show file tree
Hide file tree
Showing 14 changed files with 535 additions and 389 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -12,6 +12,6 @@ install:
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d -s .)
- go tool vet .
- go vet ./...
- go test -v -race ./...
- diff -u <(echo -n) <(markdownfmt -d README.md)

0 comments on commit 0ad3159

Please sign in to comment.