Merge pull request #257 from mdrazak2001/test-fix-219

Fix broken test on Windows
This commit is contained in:
Ankit Mahato
2024-03-08 13:33:22 +05:30
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,4 @@
import 'package:apidash/consts.dart';
import 'package:test/test.dart';
import 'package:apidash/utils/file_utils.dart';
@ -11,8 +12,13 @@ void main() {
});
test('Test getShortPath', () {
String path = "A/B/C/D.csv";
expect(getShortPath(path), ".../C/D.csv");
if (kIsWindows) {
String path = r"A\B\C\D.csv";
expect(getShortPath(path), r"...\C\D.csv");
} else {
String path = "A/B/C/D.csv";
expect(getShortPath(path), ".../C/D.csv");
}
});
test('Test getTempFileName', () {