Skip to content

Commit bec135a

Browse files
committed
fix: path separator issue in some tests
1 parent 26c62bc commit bec135a

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

test/src/cli/test_runner_cli_test.dart

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ void main() {
433433
'The test description was: renders CounterPage',
434434
'\x1B[2K\rApp renders CounterPage ${tempDirectory.path}/test/app/view/app_test.dart (FAILED)',
435435
'\x1B[2K\rFailing Tests:\n'
436-
'\x1B[2K\r - test/app/view/app_test.dart \n'
436+
'\x1B[2K\r - ${p.join('test', 'app', 'view', 'app_test.dart')} \n'
437437
'\x1B[2K\r \t- [ERROR] App renders CounterPage\n',
438438
]),
439439
);
@@ -537,9 +537,9 @@ void main() {
537537
stderrLogs,
538538
equals([
539539
'\x1B[2K\rerror',
540-
'\x1B[2K\rtest/example_test.dart 4 main\n',
540+
'\x1B[2K\r${p.join('test', 'example_test.dart')} 4 main\n',
541541
'\x1B[2K\rFailing Tests:\n'
542-
'\x1B[2K\r - test/app/view/app_test.dart \n'
542+
'\x1B[2K\r - ${p.join('test', 'app', 'view', 'app_test.dart')} \n'
543543
'''\x1B[2K\r \t- [FAILED] CounterCubit emits [1] when increment is called\n''',
544544
]),
545545
);
@@ -1153,7 +1153,11 @@ void main() {
11531153
suite: TestSuite(
11541154
id: 4,
11551155
platform: 'vm',
1156-
path: '${tempDirectory.path}/test/.test_optimizer.dart',
1156+
path: p.join(
1157+
tempDirectory.path,
1158+
'test',
1159+
'.test_optimizer.dart',
1160+
),
11571161
),
11581162
time: 0,
11591163
),
@@ -1213,9 +1217,9 @@ void main() {
12131217
stderrLogs,
12141218
equals([
12151219
'\x1B[2K\rerror',
1216-
'\x1B[2K\rtest/example_test.dart 4 main\n',
1220+
'\x1B[2K\r${p.join('test', 'example_test.dart')} 4 main\n',
12171221
'\x1B[2K\rFailing Tests:\n'
1218-
'\x1B[2K\r - test/app/view/app_test.dart \n'
1222+
'\x1B[2K\r - ${p.join('test', 'app', 'view', 'app_test.dart')} \n'
12191223
'''\x1B[2K\r \t- [FAILED] CounterCubit emits [1] when increment is called\n''',
12201224
]),
12211225
);
@@ -1231,8 +1235,8 @@ void main() {
12311235
final updatedVars = <String, dynamic>{
12321236
'package-root': tempDirectory.path,
12331237
'notOptimizedTests': [
1234-
'app/view/app_test.dart',
1235-
'app/cubit/cubit_test.dart',
1238+
p.join('app', 'view', 'app_test.dart'),
1239+
p.join('app', 'cubit', 'cubit_test.dart'),
12361240
],
12371241
};
12381242
File(p.join(tempDirectory.path, 'pubspec.yaml')).createSync();
@@ -1281,8 +1285,8 @@ void main() {
12811285
testRunnerArgs,
12821286
equals([
12831287
p.join('test', '.test_optimizer.dart'),
1284-
'test/app/view/app_test.dart',
1285-
'test/app/cubit/cubit_test.dart',
1288+
p.join('test', 'app', 'view', 'app_test.dart'),
1289+
p.join('test', 'app', 'cubit', 'cubit_test.dart'),
12861290
]),
12871291
);
12881292
},

0 commit comments

Comments
 (0)