-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
351db60
commit e1813b5
Showing
18 changed files
with
154 additions
and
65 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
Submodule ahk2
updated
from 611cef to fddd2e
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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,51 @@ | ||
import * as assert from 'assert'; | ||
import * as vscode from 'vscode'; | ||
import * as path from 'path'; | ||
import { | ||
closePanel, | ||
getDocument, | ||
isOutputVisible, | ||
showDocument, | ||
updateConfig, | ||
} from './utils'; | ||
|
||
// Currently in `out` folder, need to get back to main `src` folder | ||
const filesParentPath = path.join( | ||
__dirname, // ./out/src/test | ||
'..', // ./out/src | ||
'..', // ./out | ||
'..', // . | ||
'src', // ./src | ||
'test', // ./src/test | ||
'samples', // ./src/test/samples | ||
); | ||
|
||
suite('ahk2', () => { | ||
// CI does not have AHK installed | ||
suite('general.showOutput @ignoreCI', () => { | ||
const before = async (show: 'always' | 'never') => { | ||
await updateConfig('general', { showOutput: show }); | ||
const filePath = path.join(filesParentPath, 'ahk2.ahk2'); | ||
const doc = await getDocument(filePath); | ||
await showDocument(doc); | ||
}; | ||
|
||
const runTests: [name: string, show: 'always' | 'never'][] = [ | ||
['always + run', 'always'], | ||
['never + run', 'never'], | ||
]; | ||
|
||
runTests.forEach(([name, show]) => { | ||
test(name, async () => { | ||
await before(show); | ||
|
||
// run cmd opens panel when `showOutput` is 'always' | ||
await closePanel(); | ||
|
||
await vscode.commands.executeCommand(`ahk++.run`); | ||
|
||
assert.equal(await isOutputVisible(), show === 'always'); | ||
}); | ||
}); | ||
}); | ||
}); |
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,4 @@ | ||
#Requires AutoHotkey v2.0 | ||
#SingleInstance Force | ||
|
||
x := 1 |
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 @@ | ||
import * as assert from 'assert'; | ||
import * as vscode from 'vscode'; | ||
import { closePanel, isOutputVisible } from './utils'; | ||
|
||
suite('utils', () => { | ||
suite('closeOutputView', () => { | ||
test('open to closed', async () => { | ||
vscode.commands.executeCommand('workbench.action.togglePanel'); // open panel | ||
await closePanel(); | ||
|
||
assert.equal(await isOutputVisible(), false); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.