Skip to content

Commit

Permalink
fix: make coverage output paths relative on Ubuntu and macOS by remov…
Browse files Browse the repository at this point in the history
…ing leading slash
  • Loading branch information
Dhruv-Maradiya committed Feb 4, 2025
1 parent 28c6c7b commit e7a315a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkgs/coverage/test/collect_coverage_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ void main() {

// Parse arguments with command line args
final collectedCoverage = collect_coverage.parseArgs([
'--out=/var/coverage_data/coverage.json',
'--out=var/coverage_data/coverage.json',
'--scope-output=lib',
'--no-function-coverage',
'--branch-coverage',
], configuredOptions);
final formattedCoverage = format_coverage.parseArgs([
'--out=/var/coverage_data/out_test.info',
'--out=var/coverage_data/out_test.info',
'--package=../code_builder',
], configuredOptions);
final testCoverage = await test_with_coverage.parseArgs([
Expand All @@ -167,14 +167,14 @@ void main() {

// Verify collect coverage command line args
expect(collectedCoverage.out,
path.normalize('/var/coverage_data/coverage.json'));
path.normalize('var/coverage_data/coverage.json'));
expect(collectedCoverage.scopedOutput, ['lib']);
expect(collectedCoverage.functionCoverage, isFalse);
expect(collectedCoverage.branchCoverage, isTrue);

// Verify format coverage command line args
expect(formattedCoverage.output,
path.normalize('/var/coverage_data/out_test.info'));
path.normalize('var/coverage_data/out_test.info'));
expect(formattedCoverage.packagePath, '../code_builder');

// Verify test with coverage command line args
Expand Down

0 comments on commit e7a315a

Please sign in to comment.