-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not delete output file names that are same as input file name (#43448
) * Add failing test case * Do not delete output file names that are same as input file name Fixes #43116
- Loading branch information
1 parent
3dd68b8
commit d51b8cf
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace ts { | ||
describe("unittests:: tsbuild - clean", () => { | ||
verifyTsc({ | ||
scenario: "clean", | ||
subScenario: `file name and output name clashing`, | ||
commandLineArgs: ["--b", "/src/tsconfig.json", "-clean"], | ||
fs: () => loadProjectFromFiles({ | ||
"/src/index.js": "", | ||
"/src/bar.ts": "", | ||
"/src/tsconfig.json": JSON.stringify({ | ||
compilerOptions: { allowJs: true }, | ||
}), | ||
}), | ||
}); | ||
}); | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/tsbuild/clean/initial-build/file-name-and-output-name-clashing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Input:: | ||
//// [/lib/lib.d.ts] | ||
|
||
|
||
//// [/src/bar.ts] | ||
|
||
|
||
//// [/src/index.js] | ||
|
||
|
||
//// [/src/tsconfig.json] | ||
{"compilerOptions":{"allowJs":true}} | ||
|
||
|
||
|
||
Output:: | ||
/lib/tsc --b /src/tsconfig.json -clean | ||
exitCode:: ExitStatus.Success | ||
|
||
|