forked from mark-wiemer-org/ahkpp
-
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.
Co-authored-by: Mark Wiemer <7833360+mark-wiemer@users.noreply.github.com>
- Loading branch information
1 parent
ba98bee
commit 6dc1db6
Showing
4 changed files
with
110 additions
and
13 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
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,56 @@ | ||
import * as assert from 'assert'; | ||
import { RunnerService } from '../../../service/runnerService'; | ||
|
||
suite('RunnerService', () => { | ||
suite('compileCommand', () => { | ||
const compilePath = 'C:/Ahk2Exe.exe'; | ||
const scriptPath = 'C:/Untitled.ahk'; | ||
const exePath = 'C:/Untitled.exe'; | ||
// List of test data | ||
let dataList = [ | ||
// { | ||
// cp: , // compiler path | ||
// sp: , // script path | ||
// sg: , // show GUI | ||
// rs: , // expected result | ||
// }, | ||
{ | ||
cp: compilePath, | ||
sp: scriptPath, | ||
sg: false, | ||
rs: `"${compilePath}" /in "${scriptPath}" /out "${exePath}"`, | ||
}, | ||
{ | ||
cp: compilePath, | ||
sp: scriptPath, | ||
sg: true, | ||
rs: `"${compilePath}" /gui /in "${scriptPath}" /out "${exePath}"`, | ||
}, | ||
{ | ||
cp: '', | ||
sp: '', | ||
sg: false, | ||
rs: '', | ||
}, | ||
]; | ||
dataList.forEach((data) => { | ||
test( | ||
'compilePath: "' + | ||
data.cp + | ||
'" scriptPath: "' + | ||
data.sp + | ||
'" showGui: ' + | ||
data.sg.toString() + | ||
" => '" + | ||
data.rs + | ||
"'", | ||
() => { | ||
assert.strictEqual( | ||
RunnerService.compileCommand(data.cp, data.sp, data.sg), | ||
data.rs, | ||
); | ||
}, | ||
); | ||
}); | ||
}); | ||
}); |