mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-06 15:03:14 -05:00
Add tests
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
tests/cases/conformance/externalModules/1.ts(1,10): error TS1005: 'as' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,15): error TS1005: 'from' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,15): error TS1141: String literal expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,25): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/0.ts (0 errors) ====
|
||||
export class C { }
|
||||
|
||||
==== tests/cases/conformance/externalModules/1.ts (5 errors) ====
|
||||
import * from Zero from "./0"
|
||||
~~~~
|
||||
!!! error TS1005: 'as' expected.
|
||||
~~~~
|
||||
!!! error TS1005: 'from' expected.
|
||||
~~~~
|
||||
!!! error TS1141: String literal expected.
|
||||
~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -0,0 +1,26 @@
|
||||
//// [tests/cases/conformance/externalModules/invalidSyntaxNamespaceImportWithAMD.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export class C { }
|
||||
|
||||
//// [1.ts]
|
||||
import * from Zero from "./0"
|
||||
|
||||
//// [0.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
exports.C = C;
|
||||
});
|
||||
//// [1.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
from;
|
||||
"./0";
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
tests/cases/conformance/externalModules/1.ts(1,10): error TS1005: 'as' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,15): error TS1005: 'from' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,15): error TS1141: String literal expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,25): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/0.ts (0 errors) ====
|
||||
export class C { }
|
||||
|
||||
==== tests/cases/conformance/externalModules/1.ts (5 errors) ====
|
||||
import * from Zero from "./0"
|
||||
~~~~
|
||||
!!! error TS1005: 'as' expected.
|
||||
~~~~
|
||||
!!! error TS1005: 'from' expected.
|
||||
~~~~
|
||||
!!! error TS1141: String literal expected.
|
||||
~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [tests/cases/conformance/externalModules/invalidSyntaxNamespaceImportWithCommonjs.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export class C { }
|
||||
|
||||
//// [1.ts]
|
||||
import * from Zero from "./0"
|
||||
|
||||
//// [0.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
exports.C = C;
|
||||
//// [1.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var from = require();
|
||||
from;
|
||||
"./0";
|
||||
@@ -0,0 +1,22 @@
|
||||
tests/cases/conformance/externalModules/1.ts(1,10): error TS1005: 'as' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,15): error TS1005: 'from' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,15): error TS1141: String literal expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/externalModules/1.ts(1,25): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/0.ts (0 errors) ====
|
||||
export class C { }
|
||||
|
||||
==== tests/cases/conformance/externalModules/1.ts (5 errors) ====
|
||||
import * from Zero from "./0"
|
||||
~~~~
|
||||
!!! error TS1005: 'as' expected.
|
||||
~~~~
|
||||
!!! error TS1005: 'from' expected.
|
||||
~~~~
|
||||
!!! error TS1141: String literal expected.
|
||||
~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -0,0 +1,38 @@
|
||||
//// [tests/cases/conformance/externalModules/invalidSyntaxNamespaceImportWithSystem.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export class C { }
|
||||
|
||||
//// [1.ts]
|
||||
import * from Zero from "./0"
|
||||
|
||||
//// [0.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var C;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
exports_1("C", C);
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [1.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var from;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
from;
|
||||
"./0";
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
// @module: amd
|
||||
// @filename: 0.ts
|
||||
export class C { }
|
||||
|
||||
// @filename: 1.ts
|
||||
import * from Zero from "./0"
|
||||
@@ -0,0 +1,6 @@
|
||||
// @module: commonjs
|
||||
// @filename: 0.ts
|
||||
export class C { }
|
||||
|
||||
// @filename: 1.ts
|
||||
import * from Zero from "./0"
|
||||
@@ -0,0 +1,6 @@
|
||||
// @module: system
|
||||
// @filename: 0.ts
|
||||
export class C { }
|
||||
|
||||
// @filename: 1.ts
|
||||
import * from Zero from "./0"
|
||||
Reference in New Issue
Block a user