Skip to content

Commit

Permalink
add a test for #1362
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Oct 17, 2021
1 parent 3690949 commit 0964b6b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions internal/bundler/bundler_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4766,3 +4766,23 @@ func TestEntryNamesNoSlashAfterDir(t *testing.T) {
},
})
}

func TestEntryNamesNonPortableCharacter(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry1-*.ts": `console.log(1)`,
"/entry2-*.ts": `console.log(2)`,
},
entryPathsAdvanced: []EntryPoint{
// The "*" should turn into "_" for cross-platform Windows portability
{InputPath: "/entry1-*.ts"},

// The "*" should be preserved since the user _really_ wants it
{InputPath: "/entry2-*.ts", OutputPath: "entry2-*"},
},
options: config.Options{
Mode: config.ModePassThrough,
AbsOutputDir: "/out",
},
})
}
8 changes: 8 additions & 0 deletions internal/bundler/snapshots/snapshots_default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,14 @@ console.log(2);
---------- /out/-customPath.js ----------
console.log(3);

================================================================================
TestEntryNamesNonPortableCharacter
---------- /out/entry1-_.js ----------
console.log(1);

---------- /out/entry2-*.js ----------
console.log(2);

================================================================================
TestExportChain
---------- /out.js ----------
Expand Down

0 comments on commit 0964b6b

Please sign in to comment.