source: frontend/node_modules/shell-quote/test/set.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 565 bytes
Line 
1'use strict';
2
3var test = require('tape');
4var parse = require('../').parse;
5
6test('set env vars', function (t) {
7 t.same(
8 parse('ABC=444 x y z'),
9 ['ABC=444', 'x', 'y', 'z']
10 );
11 t.same(
12 parse('ABC=3\\ 4\\ 5 x y z'),
13 ['ABC=3 4 5', 'x', 'y', 'z']
14 );
15 t.same(
16 parse('X="7 8 9" printx'),
17 ['X=7 8 9', 'printx']
18 );
19 t.same(
20 parse('X="7 8 9"; printx'),
21 ['X=7 8 9', { op: ';' }, 'printx']
22 );
23 t.same(
24 parse('X="7 8 9"; printx', function () {
25 t.fail('should not have matched any keys');
26 }),
27 ['X=7 8 9', { op: ';' }, 'printx']
28 );
29
30 t.end();
31});
Note: See TracBrowser for help on using the repository browser.