Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Oct 11, 2024
1 parent 2d35db9 commit 08778ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ build/
pubspec.lock

# macOS
.DS_Store
.DS_Store

*.log
13 changes: 7 additions & 6 deletions test/link_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:io';

import 'package:io/io.dart';
import 'package:path/path.dart' as p;
import 'package:path/path.dart' as path;
import 'package:test/test.dart';

import 'test_utils.dart';
Expand All @@ -19,7 +19,7 @@ void main() {
// The pub get should NOT run in the example app
expectLine(
stdout,
[p.join('dart_puby_test', 'example'), 'dart pub get --offline'],
[path.join('dart_puby_test', 'example'), 'dart pub get --offline'],
matches: false,
);

Expand All @@ -29,12 +29,12 @@ void main() {
// The link should run in the example app
expectLine(
stdout,
[p.join('flutter_puby_test', 'example'), 'Resolved dependencies for'],
[path.join('flutter_puby_test', 'example'), 'Resolved dependencies for'],
);
// The pub get should NOT run in the example app
expectLine(
stdout,
[p.join('flutter_puby_test', 'example'), 'flutter pub get --offline'],
[path.join('flutter_puby_test', 'example'), 'flutter pub get --offline'],
matches: false,
);

Expand All @@ -43,8 +43,9 @@ void main() {
expectLine(stdout, ['fvm_puby_test', 'fvm flutter pub get --offline']);
// Ensure the correct flutter version was used
expect(
File('test_resources/fvm_puby_test/.dart_tool/version')
.readAsStringSync(),
File(
path.join('test_resources', 'fvm_puby_test', '.dart_tool', 'version'),
).readAsStringSync(),
'3.10.0',
);
});
Expand Down
11 changes: 6 additions & 5 deletions test/no_fvm_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:io';

import 'package:io/io.dart';
import 'package:test/test.dart';
import 'package:path/path.dart' as p;
import 'package:path/path.dart' as path;

import 'test_utils.dart';

Expand All @@ -17,8 +17,9 @@ void main() {
expectLine(stdout, ['fvm_puby_test', message]);
// Ensure the FVM Flutter version was not used
expect(
File('test_resources/fvm_puby_test/.dart_tool/version')
.readAsStringSync(),
File(
path.join('test_resources', 'fvm_puby_test', '.dart_tool', 'version'),
).readAsStringSync(),
isNot('3.10.0'),
);
});
Expand All @@ -37,7 +38,7 @@ void main() {

expect(result.exitCode, ExitCode.success.code);
expectLine(stdout, ['fvm_puby_test', message]);
expectLine(stdout, [p.join('fvm_puby_test', 'example'), message]);
expectLine(stdout, [p.join('fvm_puby_test', 'nested'), message]);
expectLine(stdout, [path.join('fvm_puby_test', 'example'), message]);
expectLine(stdout, [path.join('fvm_puby_test', 'nested'), message]);
});
}

0 comments on commit 08778ca

Please sign in to comment.