Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: pkg/analysis_server/test/services/refactoring/rename_library_test.dart

Issue 1370793003: Issue 24442. Fix for renaming library names with spaces. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/source_range.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/refactoring/rename_library_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
index 619a2485d8d3ecc5b51bf58b5a2425d6488773af..b08132dc397a51598e486fd79bed9015e91ac054 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
@@ -71,6 +71,35 @@ part of the.new.name;
''');
}
+ test_createChange_hasWhitespaces() async {
+ Source unitSource = addSource(
+ '/part.dart',
+ '''
+part of my . app;
+''');
+ indexTestUnit('''
+library my . app;
+part 'part.dart';
+''');
+ index.index(
+ context, context.resolveCompilationUnit2(unitSource, testSource));
+ // configure refactoring
+ _createRenameRefactoring();
+ expect(refactoring.refactoringName, 'Rename Library');
+ expect(refactoring.elementKindName, 'library');
+ refactoring.newName = 'the.new.name';
+ // validate change
+ await assertSuccessfulRefactoring('''
+library the.new.name;
+part 'part.dart';
+''');
+ assertFileChangeResult(
+ '/part.dart',
+ '''
+part of the.new.name;
+''');
+ }
+
void _createRenameRefactoring() {
createRenameRefactoringForElement(testUnitElement.library);
}
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/source_range.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698