Skip to content

Commit

Permalink
tests for setting env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 24, 2013
1 parent 9a4c11c commit f44b039
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/set.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var test = require('tape');
var parse = require('../').parse;

test('set env vars', function (t) {
t.same(
parse('ABC=444 x y z'),
[ { key: 'X', value: '444' }, 'x', 'y', 'z' ]
);
t.same(
parse('ABC=3\\ 4\\ 5 x y z'),
[ { key: 'X', value: '3 4 5' }, 'x', 'y', 'z' ]
);
t.same(
parse('X="7 8 9" printx'),
[ { key: 'X', value: '7 8 9' }, 'printx' ]
);

t.end();
});

0 comments on commit f44b039

Please sign in to comment.