Skip to content

Commit 593ba66

Browse files
committed
Test cases for --sourceMap --inlineSources option
1 parent 0c96d7b commit 593ba66

18 files changed

+176
-0
lines changed

tests/baselines/reference/optionsSourcemapInlineSources.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.

tests/baselines/reference/optionsSourcemapInlineSources.js.map

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

tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.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.

tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js.map

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

0 commit comments

Comments
 (0)