Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
def601ac
Unverified
Commit
def601ac
authored
Jun 27, 2021
by
Jonah Williams
Committed by
GitHub
Jun 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] re-enable all tests on windows (#85384)
parent
0b5d99ea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
test.dart
dev/bots/test.dart
+1
-4
generate_localizations_test.dart
.../commands.shard/hermetic/generate_localizations_test.dart
+23
-4
No files found.
dev/bots/test.dart
View file @
def601ac
...
...
@@ -276,13 +276,10 @@ Future<void> _runGeneralToolTests() async {
}
Future
<
void
>
_runCommandsToolTests
()
async
{
// Due to https://github.com/flutter/flutter/issues/46180, skip the hermetic directory
// on Windows.
final
String
suffix
=
Platform
.
isWindows
?
'permeable'
:
''
;
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
),
forceSingleCore:
true
,
testPaths:
<
String
>[
path
.
join
(
'test'
,
'commands.shard'
,
suffix
)],
testPaths:
<
String
>[
path
.
join
(
'test'
,
'commands.shard'
)],
);
}
...
...
packages/flutter_tools/test/commands.shard/hermetic/generate_localizations_test.dart
View file @
def601ac
...
...
@@ -7,6 +7,7 @@
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/commands/generate_localizations.dart'
;
import
'package:flutter_tools/src/runner/flutter_command.dart'
;
...
...
@@ -16,8 +17,17 @@ import '../../src/context.dart';
import
'../../src/test_flutter_command_runner.dart'
;
void
main
(
)
{
FileSystem
fileSystem
;
setUpAll
(()
{
Cache
.
disableLocking
();
});
setUp
(()
{
fileSystem
=
MemoryFileSystem
.
test
();
});
testUsingContext
(
'default l10n settings'
,
()
async
{
final
MemoryFileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
File
arbFile
=
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'lib'
,
'l10n'
,
'app_en.arb'
))
..
createSync
(
recursive:
true
);
...
...
@@ -40,10 +50,12 @@ void main() {
expect
(
outputDirectory
.
existsSync
(),
true
);
expect
(
outputDirectory
.
childFile
(
'app_localizations_en.dart'
).
existsSync
(),
true
);
expect
(
outputDirectory
.
childFile
(
'app_localizations.dart'
).
existsSync
(),
true
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
testUsingContext
(
'not using synthetic packages'
,
()
async
{
final
MemoryFileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
Directory
l10nDirectory
=
fileSystem
.
directory
(
fileSystem
.
path
.
join
(
'lib'
,
'l10n'
),
...
...
@@ -74,10 +86,12 @@ void main() {
expect
(
l10nDirectory
.
existsSync
(),
true
);
expect
(
l10nDirectory
.
childFile
(
'app_localizations_en.dart'
).
existsSync
(),
true
);
expect
(
l10nDirectory
.
childFile
(
'app_localizations.dart'
).
existsSync
(),
true
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
testUsingContext
(
'throws error when arguments are invalid'
,
()
async
{
final
MemoryFileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
File
arbFile
=
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'lib'
,
'l10n'
,
'app_en.arb'
))
..
createSync
(
recursive:
true
);
...
...
@@ -102,10 +116,12 @@ void main() {
]),
throwsToolExit
(),
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
testUsingContext
(
'l10n yaml file takes precedence over command line arguments'
,
()
async
{
final
MemoryFileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
File
arbFile
=
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'lib'
,
'l10n'
,
'app_en.arb'
))
..
createSync
(
recursive:
true
);
...
...
@@ -132,5 +148,8 @@ void main() {
expect
(
outputDirectory
.
existsSync
(),
true
);
expect
(
outputDirectory
.
childFile
(
'app_localizations_en.dart'
).
existsSync
(),
true
);
expect
(
outputDirectory
.
childFile
(
'app_localizations.dart'
).
existsSync
(),
true
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment