/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.3
test/unit/quote.exp
69 строк
1 KB
Ville Skyttä
quote: Preserve leading, trailing, and consecutive whitespace.
12 дек 2011, 02:22
12 дек 2011, 02:22
260e2a1
Код
Авторство
О чём код?
proc setup {} { save_env } proc teardown {} { assert_env_unmodified } setup set cmd {quote "a b"} set test {quote "a b" should output 'a b'} send "$cmd\r" expect -ex "$cmd\r\n" expect { -re {'a b'} { pass $test } default { fail $test } } sync_after_int set cmd {quote "a b"} set test {quote "a b" should output 'a b'} send "$cmd\r" expect -ex "$cmd\r\n" expect { -re {'a b'} { pass $test } default { fail $test } } sync_after_int set cmd {quote " a "} set test {quote " a " should output ' a '} send "$cmd\r" expect -ex "$cmd\r\n" expect { -re {' a '} { pass $test } default { fail $test } } sync_after_int set cmd {quote "a'b'c"} set test {quote "a'b'c" should output 'a'\''b'\''c'} send "$cmd\r" expect -ex "$cmd\r\n" expect { -re {'a'\\''b'\\''c'} { pass $test } default { fail $test } } sync_after_int set cmd {quote "a'"} set test {quote "a'" should output 'a'\'''} send "$cmd\r" expect -ex "$cmd\r\n" expect { -re {'a'\\'''} { pass $test } default { fail $test } } sync_after_int teardown