-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generate correct path in
modules.xml
for package at workspace …
…root (#539)
- Loading branch information
Showing
4 changed files
with
44 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:melos/src/common/intellij_project.dart'; | ||
import 'package:melos/src/common/io.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import '../utils.dart'; | ||
|
||
void main() { | ||
// /~https://github.com/invertase/melos/issues/379 | ||
test( | ||
'generates correct path for package at root in modules.xml ', | ||
() async { | ||
final tempDir = createTestTempDir(); | ||
final workspaceBuilder = VirtualWorkspaceBuilder( | ||
path: tempDir.path, | ||
''' | ||
packages: | ||
- . | ||
''', | ||
)..addPackage( | ||
''' | ||
name: root | ||
''', | ||
path: '.', | ||
); | ||
final workspace = workspaceBuilder.build(); | ||
final project = IntellijProject.fromWorkspace(workspace); | ||
await project.generate(); | ||
final modulesXml = readTextFile(project.pathModulesXml); | ||
expect(modulesXml, contains(r'file://$PROJECT_DIR$/melos_root.iml')); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters