Skip to content

Commit

Permalink
Auto merge of #782 - SirVer:00_fix_repetition_operation, r=fitzgen
Browse files Browse the repository at this point in the history
Fix tests/test-one.sh.

On Mac OS where egrep is != GNU grep, the script fails with

~~~
egrep: repetition-operator operand invalid
ERROR: no files found with pattern "virtual_inheritance"
~~~~

The `$pattern` is supposed to be a substring in the test name to run.
The leading and trailing stars are wrong, since egrep takes a regular expression, not a glob.
  • Loading branch information
bors-servo authored Jun 30, 2017
2 parents 691834d + 5b21f87 commit 1cbb5d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export RUST_BACKTRACE=1

unique_fuzzy_file() {
local pattern="$1"
local results="$(find ./tests/headers -type f | egrep -i "*$pattern*")"
local results="$(find ./tests/headers -type f | egrep -i "$pattern")"
local num_results=$(echo "$results" | wc -l)

if [[ -z "$results" ]]; then
Expand Down

0 comments on commit 1cbb5d3

Please sign in to comment.