File: strops2.tests

package info (click to toggle)
busybox 1%3A1.37.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,684 kB
  • sloc: ansic: 190,169; sh: 10,414; cpp: 1,428; makefile: 1,005; asm: 798; yacc: 570; lex: 355; perl: 334; python: 112; awk: 29
file content (12 lines) | stat: -rwxr-xr-x 234 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
# malformed regex
[[ a =~ * ]]; echo 1:ERR2:$?

[[ a/b =~ a.b ]]; echo 2:YES:$?
[[ a/b =~ /*b ]]; echo 3:YES:$?

v='[]b.-]'
[[ a/.b] =~ $v ]]; echo 4:YES:$?

v=']b.-'
[[ a/.b] =~ $v ]]; echo 5:no:$?
[[ a/.b] =~ [$v] ]]; echo 6:YES:$?