1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-29 20:15:54 +02:00
eda-tools/b2/test/subesc
2012-06-03 11:39:40 -03:00

50 lines
946 B
Bash
Executable File

#!/bin/bash
. ./Common
###############################################################################
tst "substitutions: escape *" -R '*\\*' <<EOF
EOF
expect <<EOF
^.*\*\$
EOF
#------------------------------------------------------------------------------
tst "substitutions: escape . (implicit)" -R 'x.y' <<EOF
EOF
expect <<EOF
^x\.y\$
EOF
#------------------------------------------------------------------------------
tst "substitutions: escape |" -R 'a\\\|b' <<EOF
EOF
expect <<EOF
^a\\|b\$
EOF
#------------------------------------------------------------------------------
tst "substitutions: escape \\" -R 'x\\\\y' <<EOF
EOF
expect <<EOF
^x\\\\y\$
EOF
#------------------------------------------------------------------------------
tst_fail "substitutions: escape EOL" -R 'x\\' <<EOF
EOF
expect <<EOF
dummy:2: regexp ends with backslash
EOF
###############################################################################