Skip to content

Commit

Permalink
#2846. Add unquoted imports tests for path separator (#2889)
Browse files Browse the repository at this point in the history
Add unquoted imports tests for path separator
  • Loading branch information
sgrekhov authored Sep 25, 2024
1 parent 45fb6ba commit 15a5822
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LanguageFeatures/Unquoted-imports/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ environment:
sdk: '>=3.6.0-255.0.dev'

dependencies:
test.package1:
path: ./test.package1
test_package2:
path: ./test_package2
11 changes: 11 additions & 0 deletions LanguageFeatures/Unquoted-imports/test.package1/dummy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports. Must be unavailable
/// via `import 'package:...'` and its unquoted shortcut.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "Should not be used!";
8 changes: 8 additions & 0 deletions LanguageFeatures/Unquoted-imports/test.package1/lib/a/b.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
String libraryId = "b1";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
String libraryId = "c.d1";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
String libraryId = "c1";
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "dotted.name1";

String dottedName1 = "dotted.name1";
10 changes: 10 additions & 0 deletions LanguageFeatures/Unquoted-imports/test.package1/lib/package1.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "package1";
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "test.package1";
8 changes: 8 additions & 0 deletions LanguageFeatures/Unquoted-imports/test.package1/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: test.package1
description: Internal package used by co19 tests for Unquoted imports feature

# This tests isn't intended for publishing on pub.dev.
publish_to: none

environment:
sdk: '>=3.6.0-255.0.dev'
11 changes: 11 additions & 0 deletions LanguageFeatures/Unquoted-imports/test_package2/dummy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports. Must be unavailable
/// via `import 'package:...'` and its unquoted shortcut.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "Should not be used!";
8 changes: 8 additions & 0 deletions LanguageFeatures/Unquoted-imports/test_package2/lib/a/b.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
String libraryId = "b2";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
String libraryId = "c.d2";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
String libraryId = "c2";
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "dotted.name2";
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @description Library file for testing unquoted imports.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=unquoted-imports

String libraryId = "test_package2";

String testPackage2 = "test_package2";

0 comments on commit 15a5822

Please sign in to comment.