mutter/cogl/tests/conform/meson/find-conform-unit-tests.sh
Ting-Wei Lan 319500e4f3 tests: Fix warnings reported by shellcheck
This commit includes following fixes for a few shell scripts:

1. Follow the best practice of quoting variables everywhere unless they
   are used in places where word-splitting and globbing can never happen.

2. Replace `command` with $(command) because the latter is easier to use
   and read.

3. Don't use "$@" in places expecting a string because it is an array
   of strings instead of a single string.
2018-12-01 13:07:29 +00:00

11 lines
205 B
Bash
Executable File

#!/bin/sh
inputfile="$1"
outputfile="$2"
echo > "$outputfile"
sed -n -e 's/^ \{1,\}ADD_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' "$inputfile" | while read -r test; do
echo "$test" >> "$outputfile"
done