Skip to content

Commit 8020bf9

Browse files
committed
Test cases to verify --inlineSourceMap with --sourcemap --mapRoot and --sourceRoot
Note that --sourceRoot fails with crash
1 parent 593ba66 commit 8020bf9

9 files changed

+108
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'.
2+
error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'.
3+
4+
5+
!!! error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'.
6+
!!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'.
7+
==== tests/cases/compiler/optionsInlineSourceMapMapRoot.ts (0 errors) ====
8+
9+
var a = 10;

tests/baselines/reference/optionsInlineSourceMapMapRoot.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
===================================================================
2+
JsFile: optionsInlineSourceMapMapRoot.js
3+
mapUrl: c:/TypeScript/tests/cases/compiler/optionsInlineSourceMapMapRoot.js.map
4+
sourceRoot:
5+
sources: optionsInlineSourceMapMapRoot.ts
6+
===================================================================
7+
-------------------------------------------------------------------
8+
emittedFile:tests/cases/compiler/optionsInlineSourceMapMapRoot.js
9+
sourceFile:optionsInlineSourceMapMapRoot.ts
10+
-------------------------------------------------------------------
11+
>>>var a = 10;
12+
1 >
13+
2 >^^^^
14+
3 > ^
15+
4 > ^^^
16+
5 > ^^
17+
6 > ^
18+
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
19+
1 >
20+
>
21+
2 >var
22+
3 > a
23+
4 > =
24+
5 > 10
25+
6 > ;
26+
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
27+
2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0)
28+
3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0)
29+
4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0)
30+
5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0)
31+
6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0)
32+
---
33+
>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcE1hcFJvb3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvcHRpb25zSW5saW5lU291cmNlTWFwTWFwUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ==
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
2+
3+
4+
!!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
5+
==== tests/cases/compiler/optionsInlineSourceMapSourcemap.ts (0 errors) ====
6+
7+
var a = 10;

tests/baselines/reference/optionsInlineSourceMapSourcemap.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
===================================================================
2+
JsFile: optionsInlineSourceMapSourcemap.js
3+
mapUrl: optionsInlineSourceMapSourcemap.js.map
4+
sourceRoot:
5+
sources: optionsInlineSourceMapSourcemap.ts
6+
===================================================================
7+
-------------------------------------------------------------------
8+
emittedFile:tests/cases/compiler/optionsInlineSourceMapSourcemap.js
9+
sourceFile:optionsInlineSourceMapSourcemap.ts
10+
-------------------------------------------------------------------
11+
>>>var a = 10;
12+
1 >
13+
2 >^^^^
14+
3 > ^
15+
4 > ^^^
16+
5 > ^^
17+
6 > ^
18+
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
19+
1 >
20+
>
21+
2 >var
22+
3 > a
23+
4 > =
24+
5 > 10
25+
6 > ;
26+
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
27+
2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0)
28+
3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0)
29+
4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0)
30+
5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0)
31+
6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0)
32+
---
33+
>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbnNJbmxpbmVTb3VyY2VNYXBTb3VyY2VtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDIn0=
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @mapRoot: local
2+
// @inlineSourceMap: true
3+
4+
var a = 10;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @sourceRoot: local
2+
// @inlineSourceMap: true
3+
4+
var a = 10;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @sourcemap: true
2+
// @inlineSourceMap: true
3+
4+
var a = 10;

0 commit comments

Comments
 (0)