Skip to content

Commit

Permalink
Merge pull request #236 from zvezdan/fix-env-regex-take2
Browse files Browse the repository at this point in the history
Fix env regex in integ test.
  • Loading branch information
zvezdan authored Jul 10, 2018
2 parents d544577 + 40dade6 commit df1e2a6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class PackageSettingsIntegrationTest extends Specification {
| return (packageInfo.name != 'foo') ? [:] : [
| 'CPPFLAGS': '-I/some/custom/path/include',
| 'LDFLAGS': '-L/some/custom/path/lib -Wl,-rpath,/some/custom/path/lib',
| 'DUMMY_MAP': '{\\n}',
| ]
| }
| }
Expand All @@ -74,7 +75,7 @@ class PackageSettingsIntegrationTest extends Specification {
println result.output

then: "we can observe the environment for 'foo' provided a few lines after its install is logged"
def match = result.output.find(/Installing foo[\s\S]+?Environment for[^\n]+: \{.+\}\s*\n/)
def match = result.output.find(/Installing foo[\s\S]+?Environment for[^\n]+: \{[\s\S]+?\}\s*\n/)
match != null
match.findAll('Installing ').size() == 1
match.contains('CPPFLAGS=-I/some/custom/path/include')
Expand Down Expand Up @@ -324,6 +325,7 @@ class PackageSettingsIntegrationTest extends Specification {
| return (packageInfo.name != 'foo') ? [:] : [
| 'CPPFLAGS': '-I/some/custom/path/include',
| 'LDFLAGS': '-L/some/custom/path/lib -Wl,-rpath,/some/custom/path/lib',
| 'DUMMY_MAP': '{\\n}',
| ]
| }
| }
Expand All @@ -347,7 +349,7 @@ class PackageSettingsIntegrationTest extends Specification {
println result.output

then: "we can observe the environment for 'foo' provided a few lines after its build is logged"
def match = result.output.find(/Installing foo\S* wheel[\s\S]+?Environment for[^\n]+: \{.+\}\s*\n/)
def match = result.output.find(/Installing foo\S* wheel[\s\S]+?Environment for[^\n]+: \{[\s\S]+?\}\s*\n/)
match != null
match.findAll('Installing ').size() == 1
match.contains('CPPFLAGS=-I/some/custom/path/include')
Expand Down

0 comments on commit df1e2a6

Please sign in to comment.