Skip to content

Commit c65f584

Browse files
committed
Add mock pester test, update appveyor
1 parent dadd3e9 commit c65f584

File tree

6 files changed

+27
-11
lines changed

6 files changed

+27
-11
lines changed

appveyor.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
install:
2-
# TODO: Use Desired state configuration or a block script.
3-
- ps: write-output "installing sublime text 3"
4-
- ps: start-filedownload "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203059%20x64.zip"
5-
- ps: write-output "installing Sublime%20Text%20Build%203059%20x64.zip"
6-
- ps: 7z.exe x "Sublime%20Text%20Build%203059%20x64.zip" -o"C:\st" > $null
7-
- ps: mkdir "C:\st\Data\Packages" -force > $null
8-
- ps: mkdir "C:\st\Data\Packages\PowerShell" -force > $null
9-
- ps: cp -Recurse * "C:\st\Data\Packages\PowerShell" -Force
10-
- ps: git clone -q --branch=master https://github.com/my-personal-forks/UnitTesting.git "C:\st\Data\Packages\UnitTesting"
2+
- ps: >-
3+
write-output "installing sublime text 3"
4+
start-filedownload "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203059%20x64.zip"
5+
write-output "installing Sublime%20Text%20Build%203059%20x64.zip"
6+
7z.exe x "Sublime%20Text%20Build%203059%20x64.zip" -o"C:\st" > $null
7+
mkdir "C:\st\Data\Packages" -force > $null
8+
mkdir "C:\st\Data\Packages\PowerShell" -force > $null
9+
cp -Recurse * "C:\st\Data\Packages\PowerShell" -Force
10+
git clone -q --branch=master https://github.com/my-personal-forks/UnitTesting.git "C:\st\Data\Packages\UnitTesting"
11+
write-output "installing pester"
12+
cinst pester
1113
1214
build: false
1315

tests/pester/Syntax.Tests.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<#
2+
3+
This Pester UT file consumes tokens generated by python unit test Test_TokenGenerator.testGetTokens .
4+
You need to run python tests first to make it work.
5+
6+
#>
7+
8+
Describe "Syntax highlighting" {
9+
Context "bla" {
10+
It "test" {
11+
1 | Should be 1
12+
}
13+
}
14+
}
File renamed without changes.
File renamed without changes.

tests/syntax_def/test_syntax.py renamed to tests/py/syntax_def/test_syntax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from PowerShell.tests import PowerShellSyntaxTest
1+
from PowerShell.tests.py import PowerShellSyntaxTest
22

33

44
class Test_DoubleQuoted_HereDocStrings(PowerShellSyntaxTest):

tests/syntax_def/test_token_gen.py renamed to tests/py/syntax_def/test_token_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sublime
33
import json
44

5-
from PowerShell.tests import PowerShellSyntaxTokenTest
5+
from PowerShell.tests.py import PowerShellSyntaxTokenTest
66

77
class Test_TokenGenerator(PowerShellSyntaxTokenTest):
88
def testGetTokens(self):

0 commit comments

Comments
 (0)