File: D1483.check-rlfunc-decode-error.sh

package info (click to toggle)
ble.sh 0.4.0~git20250321.d4c812b-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,516 kB
  • sloc: sh: 71,367; awk: 1,316; cpp: 750; ansic: 186; javascript: 43; makefile: 35
file content (19 lines) | stat: -rw-r--r-- 335 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

echo "----------"
echo "locale"
locale

echo "----------"
echo "test regex (default locale)"

rex='^"([^\"]|\\.)*$'
[[ $'"\x9B": self-insert' =~ $rex ]]
echo "$? (${BASH_REMATCH[*]@Q})"

echo "----------"
echo "test regex (locale C)"

LC_ALL=C
[[ $'"\x9B": self-insert' =~ $rex ]]
echo "$? (${BASH_REMATCH[*]@Q})"