Skip to content

Commit 848848a

Browse files
committed
(maint) Update folding test fixtures
Previously some of the text in the test fixtures was confusing e.g. Text that says 'cannot fold' should read 'should fold'. This commit updates the text in the fixture to describe the expected behaviour for humans.
1 parent 9bca79c commit 848848a

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

test/fixtures/folding-crlf.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
function short-func {};
1+
function short-func-not-fold {};
22
<#
33
.SYNOPSIS
4-
Displays a list of WMI Classes based upon a search criteria
4+
This whole comment block should fold, not just the SYNOPSIS
55
.EXAMPLE
6-
Get-WmiClasses -class disk -ns rootcimv2"
6+
This whole comment block should fold, not just the EXAMPLE
77
#>
8-
function New-VSCodeCannotFold {
8+
function New-VSCodeShouldFold {
99
<#
1010
.SYNOPSIS
11-
Displays a list of WMI Classes based upon a search criteria
11+
This whole comment block should fold, not just the SYNOPSIS
1212
.EXAMPLE
13-
Get-WmiClasses -class disk -ns rootcimv2"
13+
This whole comment block should fold, not just the EXAMPLE
1414
#>
1515
$I = @'
16-
cannot fold
16+
herestrings should fold
1717
1818
'@
1919

2020
# this won't be folded
2121

22-
# This should be foldable
23-
# This should be foldable
24-
# This should be foldable
22+
# This block of comments should be foldable as a single block
23+
# This block of comments should be foldable as a single block
24+
# This block of comments should be foldable as a single block
2525

2626
#region This fools the indentation folding.
2727
Write-Host "Hello"
28-
# region
28+
# region Nested regions should be foldable
2929
Write-Host "Hello"
3030
# comment1
3131
Write-Host "Hello"
@@ -36,12 +36,12 @@ cannot fold
3636
# endregion
3737

3838
$c = {
39-
Write-Host "Hello"
39+
Write-Host "Script blocks should be foldable"
4040
}
4141

4242
# Array fools indentation folding
4343
$d = @(
44-
'element1',
45-
'elemet2'
44+
'should fold1',
45+
'should fold2'
4646
)
4747
}

test/fixtures/folding-lf.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
function short-func {};
1+
function short-func-not-fold {};
22
<#
33
.SYNOPSIS
4-
Displays a list of WMI Classes based upon a search criteria
4+
This whole comment block should fold, not just the SYNOPSIS
55
.EXAMPLE
6-
Get-WmiClasses -class disk -ns rootcimv2"
6+
This whole comment block should fold, not just the EXAMPLE
77
#>
8-
function New-VSCodeCannotFold {
8+
function New-VSCodeShouldFold {
99
<#
1010
.SYNOPSIS
11-
Displays a list of WMI Classes based upon a search criteria
11+
This whole comment block should fold, not just the SYNOPSIS
1212
.EXAMPLE
13-
Get-WmiClasses -class disk -ns rootcimv2"
13+
This whole comment block should fold, not just the EXAMPLE
1414
#>
1515
$I = @'
16-
cannot fold
16+
herestrings should fold
1717
1818
'@
1919

2020
# this won't be folded
2121

22-
# This should be foldable
23-
# This should be foldable
24-
# This should be foldable
22+
# This block of comments should be foldable as a single block
23+
# This block of comments should be foldable as a single block
24+
# This block of comments should be foldable as a single block
2525

2626
#region This fools the indentation folding.
2727
Write-Host "Hello"
28-
# region
28+
# region Nested regions should be foldable
2929
Write-Host "Hello"
3030
# comment1
3131
Write-Host "Hello"
@@ -36,12 +36,12 @@ cannot fold
3636
# endregion
3737

3838
$c = {
39-
Write-Host "Hello"
39+
Write-Host "Script blocks should be foldable"
4040
}
4141

4242
# Array fools indentation folding
4343
$d = @(
44-
'element1',
45-
'elemet2'
44+
'should fold1',
45+
'should fold2'
4646
)
4747
}

0 commit comments

Comments
 (0)