summaryrefslogtreecommitdiffstats
path: root/test/test_shlexer.sh
blob: 747de95eaf5bce45ada4969dbc157ffd2bebfa55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/bash

export FOO='bar'
export DEF='xyz'

run_cap_test ./drive_shlexer '$FOO'

run_cap_test ./drive_shlexer '${FOO}'

# run_cap_test ./drive_shlexer '\a'

run_cap_test ./drive_shlexer '\'

run_cap_test ./drive_shlexer "'abc'"

run_cap_test ./drive_shlexer '"def"'

run_cap_test ./drive_shlexer '"'"'"'"'

run_cap_test ./drive_shlexer "'"'"'"'"

run_cap_test ./drive_shlexer '"abc $DEF 123"'

run_cap_test ./drive_shlexer '"abc ${DEF} 123"'

run_cap_test ./drive_shlexer "'abc \$DEF 123'"

run_cap_test ./drive_shlexer 'abc $DEF  123'

run_cap_test ./drive_shlexer '~ foo'

run_cap_test ./drive_shlexer '~nonexistent/bar baz'