-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "5" | ||
- "4" | ||
- "0.12" | ||
- "0.11" | ||
- "0.10" | ||
env: | ||
- CXX=g++-4.8 | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
script: | ||
- npm test | ||
install: | ||
- npm install --dev | ||
before_install: | ||
- "npm update -g npm" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict'; | ||
|
||
var fs = require('fs'); | ||
var path = require('path'); | ||
var childProcess = require('child_process'); | ||
var tap = require('tap'); | ||
|
||
tap.test( | ||
'It should get an XML string as stdin and return a JSON string as stdout', | ||
function (t) { | ||
var cmd = 'cat test/sample.xml | node index'; | ||
|
||
childProcess.exec(cmd, function (err, stdout) { | ||
if (err) { | ||
return t.error(err); | ||
} | ||
|
||
var output = JSON.parse(stdout); | ||
t.same(output, { | ||
note: { | ||
to: ['Tove'], | ||
from: ['Jani'], | ||
heading: ['Reminder'], | ||
body: ['Don\'t forget me this weekend!'] | ||
} | ||
}); | ||
|
||
t.end(); | ||
}); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<note> | ||
<to>Tove</to> | ||
<from>Jani</from> | ||
<heading>Reminder</heading> | ||
<body>Don't forget me this weekend!</body> | ||
</note> |