-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows tests for TypeScript bindings.
- Loading branch information
Showing
3 changed files
with
23 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
'use strict'; | ||
|
||
import {$sh, currentExecPath, winCmdEscape, raw} from 'dollar-shell'; | ||
|
||
const $cmd = $sh({stdout: 'inherit', stderr: 'inherit'}); | ||
|
||
console.log(await $cmd`echo ${winCmdEscape('12""3')} ${raw('abc')}`); | ||
console.log(await $cmd`echo ${winCmdEscape(`hello \\wor"ld`)}`); | ||
console.log(await $cmd`${currentExecPath()} ${'tests\\manual\\argv.js'} ${`hello \\wor"ld`}`); |
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,14 @@ | ||
'use strict'; | ||
|
||
import {$sh, currentExecPath} from 'dollar-shell'; | ||
|
||
const $cmd = $sh({stdout: 'inherit', stderr: 'inherit'}); | ||
const $pwsh = $cmd({shellPath: 'pwsh.exe'}); | ||
|
||
console.log(await $pwsh`echo ${'12""3'}`); | ||
console.log(await $pwsh`echo ${`hello \\wor"ld`}`); | ||
console.log(await $pwsh`${currentExecPath()} ${'tests\\manual\\argv.js'} ${`hello \\wor"ld`}`); | ||
|
||
// tests how pwsh handles escaped arguments | ||
console.log(await $pwsh`echo 1 2 3`); | ||
console.log(await $pwsh`echo ${'1 2 3'}`); |