Skip to content

Commit

Permalink
some extra metacharacter tests just to be sure
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Apr 15, 2013
1 parent adae66f commit a6782ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ test('expand environment variables', function (t) {

t.end();
});

test('environment variables with metacharacters', function (t) {
t.same(parse('a $XYZ c', { XYZ: '"b"' }), [ 'a', '"b"', 'c' ]);
t.same(parse('a $XYZ c', { XYZ: '$X', X: 5 }), [ 'a', '$X', 'c' ]);
t.same(parse('a"$XYZ"c', { XYZ: "'xyz'" }), [ "a'xyz'c" ]);

t.end();
});

0 comments on commit a6782ae

Please sign in to comment.