Skip to content

Commit 10fc0f7

Browse files
glennsartiTylerLeonhardt
authored andcommitted
(maint) Add traits for folding tests (#837)
This commit adds trait attributes to the Code Folding tests, to make development faster by making it possible to run only a subset of tests.
1 parent 59ec19b commit 10fc0f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/PowerShellEditorServices.Test/Language/TokenOperationsTests.cs

+6
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ private void AssertFoldingReferenceArrays(
154154
Assert.Equal(expected.Length, actual.Length);
155155
}
156156

157+
[Trait("Category", "Folding")]
157158
[Fact]
158159
public void LaguageServiceFindsFoldablRegionsWithLF() {
159160
// Remove and CR characters
@@ -164,6 +165,7 @@ public void LaguageServiceFindsFoldablRegionsWithLF() {
164165
AssertFoldingReferenceArrays(expectedAllInOneScriptFolds, result);
165166
}
166167

168+
[Trait("Category", "Folding")]
167169
[Fact]
168170
public void LaguageServiceFindsFoldablRegionsWithCRLF() {
169171
// The Foldable regions should be the same regardless of line ending type
@@ -178,6 +180,7 @@ public void LaguageServiceFindsFoldablRegionsWithCRLF() {
178180
AssertFoldingReferenceArrays(expectedAllInOneScriptFolds, result);
179181
}
180182

183+
[Trait("Category", "Folding")]
181184
[Fact]
182185
public void LaguageServiceFindsFoldablRegionsWithoutLastLine() {
183186
FoldingReference[] result = GetRegions(allInOneScript, false);
@@ -191,6 +194,7 @@ public void LaguageServiceFindsFoldablRegionsWithoutLastLine() {
191194
AssertFoldingReferenceArrays(expectedFolds, result);
192195
}
193196

197+
[Trait("Category", "Folding")]
194198
[Fact]
195199
public void LaguageServiceFindsFoldablRegionsWithMismatchedRegions() {
196200
string testString =
@@ -210,6 +214,7 @@ public void LaguageServiceFindsFoldablRegionsWithMismatchedRegions() {
210214
AssertFoldingReferenceArrays(expectedFolds, result);
211215
}
212216

217+
[Trait("Category", "Folding")]
213218
[Fact]
214219
public void LaguageServiceFindsFoldablRegionsWithDuplicateRegions() {
215220
string testString =
@@ -230,6 +235,7 @@ public void LaguageServiceFindsFoldablRegionsWithDuplicateRegions() {
230235

231236
// This tests that token matching { -> }, @{ -> } and
232237
// ( -> ), @( -> ) and $( -> ) does not confuse the folder
238+
[Trait("Category", "Folding")]
233239
[Fact]
234240
public void LaguageServiceFindsFoldablRegionsWithSameEndToken() {
235241
string testString =

0 commit comments

Comments
 (0)