Skip to content

Commit 322dace

Browse files
committed
Merge pull request #72 from igorshubovych/functional-test
Functional test
2 parents 6dfbfa0 + 072136d commit 322dace

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ node_js:
66
- "4.0"
77
- "4.1"
88
- "stable"
9+
script:
10+
- npm test && npm run test:functional
911
cache:
1012
directories:
1113
- node_modules

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"test": "mocha test",
4444
"test:quiet": "mocha test --reporter=dot",
4545
"lint": "eslint lib test bin/tldr",
46-
"watch": "mocha test --reporter=min --watch --growl"
46+
"watch": "mocha test --reporter=min --watch --growl",
47+
"test:functional": "./test/functional-test.sh"
4748
},
4849
"dependencies": {
4950
"async": "~1.5.0",

test/functional-test.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
shopt -s expand_aliases
4+
5+
alias tldr="node bin/tldr"
6+
7+
function tldr-render-pages {
8+
tldr zip && \
9+
tldr du --os=linux && \
10+
tldr du --os=osx && \
11+
tldr --random && \
12+
tldr --random-example && \
13+
tldr --list && \
14+
tldr --list-all
15+
}
16+
17+
tldr --update && \
18+
tldr-render-pages && \
19+
tldr --clear-cache && \
20+
tldr --update && \
21+
tldr-render-pages

0 commit comments

Comments
 (0)