test(shebang) error case
This commit is contained in:
parent
5fcf3d7c90
commit
9754ec10e2
3 changed files with 30 additions and 0 deletions
20
tests/baselines/reference/shebangError.errors.txt
Normal file
20
tests/baselines/reference/shebangError.errors.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
tests/cases/compiler/shebangError.ts(2,1): error TS1127: Invalid character.
|
||||
tests/cases/compiler/shebangError.ts(2,2): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/compiler/shebangError.ts(2,12): error TS2304: Cannot find name 'env'.
|
||||
tests/cases/compiler/shebangError.ts(2,16): error TS1005: ';' expected.
|
||||
tests/cases/compiler/shebangError.ts(2,16): error TS2304: Cannot find name 'node'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/shebangError.ts (5 errors) ====
|
||||
var foo = 'Shebang is only allowed on the first line';
|
||||
#!/usr/bin/env node
|
||||
|
||||
!!! error TS1127: Invalid character.
|
||||
~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'env'.
|
||||
~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'node'.
|
8
tests/baselines/reference/shebangError.js
Normal file
8
tests/baselines/reference/shebangError.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
//// [shebangError.ts]
|
||||
var foo = 'Shebang is only allowed on the first line';
|
||||
#!/usr/bin/env node
|
||||
|
||||
//// [shebangError.js]
|
||||
var foo = 'Shebang is only allowed on the first line';
|
||||
!/usr/bin / env;
|
||||
node;
|
2
tests/cases/compiler/shebangError.ts
Normal file
2
tests/cases/compiler/shebangError.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
var foo = 'Shebang is only allowed on the first line';
|
||||
#!/usr/bin/env node
|
Loading…
Reference in a new issue