Debian Codegraph @

tests/generate.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 set -e
4
5 # Bash 4.3 - 5.0 because of arbitrary need to pick a single standard.
6 if ! [[ "${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" =~ (4\.[^1-2]|5\.[0-1])(\.\d+)? ]]; then
7 echo "this script requires bash 4.3, 4.4, or 5.0" >&2
8 exit 1
9 fi
10
11 CDPATH= cd "$(dirname "$0")"
12
13 cat brace-cases.txt | \
14 while read case; do
15 if [ "${case:0:1}" = "#" ]; then
16 continue;
17 fi;
18 b="$($BASH -c 'for c in '"$case"'; do echo "[$c]"; done')"
19 echo "$case"
20 echo -n "$b><><><><";
21 done > brace-results.txt