mirror of
https://github.com/foss42/apidash.git
synced 2025-05-29 21:06:01 +08:00
Fix test to check platform specific results
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import 'package:apidash/consts.dart';
|
||||
import 'package:test/test.dart';
|
||||
import 'package:apidash/utils/file_utils.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
void main() {
|
||||
group(
|
||||
@ -12,8 +12,13 @@ void main() {
|
||||
});
|
||||
|
||||
test('Test getShortPath', () {
|
||||
String path = "A/B/C/D.csv";
|
||||
expect(getShortPath(path), p.join("...", "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', () {
|
||||
|
Reference in New Issue
Block a user