summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh
blob: e040e664d9f88126341d138388f433869a63159f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

set -e

# Bash 4.3 because of arbitrary need to pick a single standard.

if [ "${BASH_VERSINFO[0]}" != "4" ] || [ "${BASH_VERSINFO[1]}" != "3" ]; then
  echo "this script requires bash 4.3" >&2
  exit 1
fi

CDPATH= cd "$(dirname "$0")"

js='require("./")(process.argv[1]).join(" ")'

cat cases.txt | \
  while read case; do
    if [ "${case:0:1}" = "#" ]; then
      continue;
    fi;
    b="$($BASH -c 'for c in '"$case"'; do echo ["$c"]; done')"
    echo "$case"
    echo -n "$b><><><><";
  done > bash-results.txt