Index: sky/tests/modules/multiple-scripts-import.sky |
diff --git a/sky/tests/modules/multiple-scripts-import.sky b/sky/tests/modules/multiple-scripts-import.sky |
new file mode 100644 |
index 0000000000000000000000000000000000000000..da450d7adf750086d396fe2b3054820829956598 |
--- /dev/null |
+++ b/sky/tests/modules/multiple-scripts-import.sky |
@@ -0,0 +1,28 @@ |
+<sky> |
+<import src='resources/multiple-scripts-child.sky' as='child'></import> |
+<script> |
+import "../resources/third_party/unittest/unittest.dart"; |
+import "../resources/unit.dart"; |
+ |
+import "dart:sky"; |
+import "dart:sky.internals"; |
+ |
+void main () { |
+ initUnit(); |
+ |
+ test('multiple libraries should combine using "as"', () { |
+ expect(child.one, 'one'); |
+ expect(child.two, 'two'); |
+ }); |
+ |
+ test('multiple libraries should each init', () { |
+ expect(child.oneInit, true); |
+ expect(child.twoInit, true); |
+ }); |
+ |
+ test('conflicting names should be ignored', () { |
+ expect(() => child.conflict, throwsNoSuchMethodError); |
+ }); |
+} |
+</script> |
+</sky> |