From 08778cae20bfa90d5035402bbd7c6f8151b19d20 Mon Sep 17 00:00:00 2001 From: Rexios Date: Fri, 11 Oct 2024 13:52:53 -0400 Subject: [PATCH] Fixes --- .gitignore | 4 +++- test/link_test.dart | 13 +++++++------ test/no_fvm_test.dart | 11 ++++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 2c8ce07..35c4ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ build/ pubspec.lock # macOS -.DS_Store \ No newline at end of file +.DS_Store + +*.log \ No newline at end of file diff --git a/test/link_test.dart b/test/link_test.dart index f09d61a..f938518 100644 --- a/test/link_test.dart +++ b/test/link_test.dart @@ -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'; @@ -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, ); @@ -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, ); @@ -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', ); }); diff --git a/test/no_fvm_test.dart b/test/no_fvm_test.dart index 16c6553..9e98176 100644 --- a/test/no_fvm_test.dart +++ b/test/no_fvm_test.dart @@ -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'; @@ -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'), ); }); @@ -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]); }); }