Updated static

This commit is contained in:
thomashii 2021-07-04 13:59:50 +08:00
parent cadbc1c4f7
commit 2146b390fb
4 changed files with 17 additions and 6 deletions

View file

@ -15,7 +15,7 @@
* Added merge_map and migrated to 2.0.0 (6/6 tests passed) * Added merge_map and migrated to 2.0.0 (6/6 tests passed)
* Added mock_request and migrated to 2.0.0 (5/5 tests) * Added mock_request and migrated to 2.0.0 (5/5 tests)
* Migrated angel_framework to 4.0.0 (149/150 tests passed) * Migrated angel_framework to 4.0.0 (149/150 tests passed)
* Migrated angel_auth to 4.0.0 (27/30 tests passed) * Migrated angel_auth to 4.0.0 (29/30 tests passed)
* Migrated angel_configuration to 4.0.0 (6/8 testspassed) * Migrated angel_configuration to 4.0.0 (6/8 testspassed)
* Migrated angel_validate to 4.0.0 (6/7 tests passed) * Migrated angel_validate to 4.0.0 (6/7 tests passed)
* Migrated json_god to 4.0.0 (13/13 tests passed) * Migrated json_god to 4.0.0 (13/13 tests passed)
@ -31,7 +31,7 @@
* Added html_builder and migrated to 2.0.0 (1/1 tests passed) * Added html_builder and migrated to 2.0.0 (1/1 tests passed)
* Migrated hot to 4.0.0 (0/0 tests passed) * Migrated hot to 4.0.0 (0/0 tests passed)
* Added range_header and migrated to 3.0.0 (12/12 tests passed) * Added range_header and migrated to 3.0.0 (12/12 tests passed)
* Migrated static to 4.0.0 (11/12 test passed) * Migrated angel_static to 4.0.0 (12/12 test passed)
* Created basic-sdk-2.12.x_nnbd template (1/1 test passed) <= Milestone 1 * Created basic-sdk-2.12.x_nnbd template (1/1 test passed) <= Milestone 1
* Migrated angel_serialize to 4.0.0 (0/0 test passed) * Migrated angel_serialize to 4.0.0 (0/0 test passed)
* Migrated angel_serialize_generator to 4.0.0 (33/33 tests passed) * Migrated angel_serialize_generator to 4.0.0 (33/33 tests passed)

View file

@ -2,9 +2,11 @@
## 4.0.1 ## 4.0.1
* Fixed `push_state_test` unit test failure on Windows
* Fixed NNBD related issues * Fixed NNBD related issues
* Added logging to `VirtualDirectory` and `CachingVirtualDirectory` to log exception * Added logging to `VirtualDirectory` and `CachingVirtualDirectory` to capture exception
* Auto detect and change file separator when POSIX file system is on Windows and vice versa
* Fixed `push_state_test` unit test failure on Windows
* 12/12 unit tests passed
## 4.0.0 ## 4.0.0

View file

@ -129,10 +129,15 @@ class VirtualDirectory {
return true; return true;
} }
// Replace the separator when running on Windows with file system // Update to the correct file separator based on file system
// detected as Linux
if (absolute.contains('\\') && fileSystem.path.separator == '/') { if (absolute.contains('\\') && fileSystem.path.separator == '/') {
absolute = absolute.replaceAll('\\', '/'); absolute = absolute.replaceAll('\\', '/');
_log.warning(
'Incompatible file system type is used. Changed file separator from "\\" to "/".');
} else if (absolute.contains('/') && fileSystem.path.separator == '\\') {
absolute = absolute.replaceAll('/', '\\');
_log.warning(
'Incompatible file system type. Changed file separator from "/" to "\\".');
} }
var stat = await fileSystem.stat(absolute); var stat = await fileSystem.stat(absolute);

View file

@ -11,8 +11,12 @@ void main() {
late TestClient client; late TestClient client;
setUp(() async { setUp(() async {
// For teting on Linux/MacOS
fileSystem = MemoryFileSystem(); fileSystem = MemoryFileSystem();
// For testing on Windows
//fileSystem = MemoryFileSystem(style: FileSystemStyle.windows);
var webDir = fileSystem.directory('web'); var webDir = fileSystem.directory('web');
await webDir.create(recursive: true); await webDir.create(recursive: true);