diff --git a/concepts/bools/.meta/config.json b/concepts/bools/.meta/config.json new file mode 100644 index 0000000..ea93703 --- /dev/null +++ b/concepts/bools/.meta/config.json @@ -0,0 +1,5 @@ +{ + "blurb": "Boolean type in PowerShell, true and false values and logical operators.", + "authors": ["glaxxie"], + "contributors": [] +} diff --git a/concepts/bools/about.md b/concepts/bools/about.md new file mode 100644 index 0000000..2c1105f --- /dev/null +++ b/concepts/bools/about.md @@ -0,0 +1,65 @@ +# About + +## Booleans + +PowerShell has the [`bool`][booleans] type to represents true and false values. +In this type there are only two values: `True` and `False`. +You can bind these values to variables with the prefix `$`: + +```powershell +> $TrueVar = $true +> $FalseVar = $FALSE +#Case senstitivity doesn't matter here +``` + +We can use [logical operators][logical-operators] like `-and`, `-or`, and `-not` to combine and evaluate Boolean expressions. + +```powershell +> $TrueVar = $true -and $true +> $FalseVar = $true -and $false + +> $TrueVar = $true -or $false +> $FalseVar = $false -or $false + +> $TrueVar = -not $false +> $FalseVar = -not $true +``` + +## Conversion and truthiness + +PowerShell can implicitly treat any type as a Boolean. +However you can also use the Boolean type accelerator `[bool]` for explicit conversion. + +Here are some general rules that PowerShell use to convert other types to Boolean values: + +$false: +- Emptry strings like `''` or `""` +- Null values like `$null` +- Numeric type with the value of zero (0) + +$true: +- Non-empty strings +- Instances of any other non-collection type + +```powershell +> [bool] 0 +False + +> [bool] 0.0 +False + +> [bool] "" +False + +> [bool] "Hello" +True + +> [bool] 1234 +True +``` + +For in depth rules about converting Boolean values from collection types, please read [here][collection-conversion]. + +[booleans]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_booleans?view=powershell +[logical-operators]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logical_operators +[collection-conversion]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_booleans?#converting-from-collection-types diff --git a/concepts/bools/introduction.md b/concepts/bools/introduction.md new file mode 100644 index 0000000..91fdac0 --- /dev/null +++ b/concepts/bools/introduction.md @@ -0,0 +1,25 @@ +# Introduction + + +PowerShell has the [`bool`][booleans] type to represents true and false values. +In this type there are only two values: `True` and `False`. +You can bind these values to variables with the prefix `$`: + +```powershell +> $TrueVar = $true +> $FalseVar = $FALSE +#Case senstitivity doesn't matter here +``` + +We can use [logical operators][logical-operators] like `-and`, `-or`, and `-not` to combine and evaluate Boolean expressions. + +```powershell +> $TrueVar = $true -and $true +> $FalseVar = $true -and $false + +> $TrueVar = $true -or $false +> $FalseVar = $false -or $false + +> $TrueVar = -not $false +> $FalseVar = -not $true +``` diff --git a/concepts/bools/links.json b/concepts/bools/links.json new file mode 100644 index 0000000..0eee841 --- /dev/null +++ b/concepts/bools/links.json @@ -0,0 +1,10 @@ +[ + { + "url": "https://en.wikipedia.org/wiki/Truth_table", + "description": "truth table" + }, + { + "url": "https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operator_precedence", + "description": "operator precedence" + } +] diff --git a/config.json b/config.json index bfa8f75..6bfb15a 100644 --- a/config.json +++ b/config.json @@ -18,7 +18,6 @@ "test_runner": { "average_run_time": 5 }, - "checklist_issue": 4, "files": { "solution": [ "%{pascal_slug}.ps1" @@ -35,16 +34,28 @@ }, "exercises": { "concept": [ - { + { "slug": "jeffreys-juicy-lasagna", "name": "Jeffrey's Juicy Lasagna", "uuid": "00e439fb-a5f4-4e0c-b89c-ea23c586c9e3", "concepts": [ - "basics" + "basics" ], "prerequisites": [], "status": "wip" - } + }, + { + "slug": "pacmans-powerful-pursuit", + "name": "Pacman's Powerful Pursuit", + "uuid": "49a52681-be7c-43db-862f-109ee13ac8a3", + "concepts": [ + "bools" + ], + "prerequisites": [ + "basics" + ], + "status": "wip" + } ], "practice": [ { @@ -155,7 +166,7 @@ "name": "Resistor Color Trio", "uuid": "666f7921-e650-4c6d-9f4c-f9a653c33a1d", "practices": [ - "strings" + "strings" ], "prerequisites": [], "difficulty": 1 @@ -311,7 +322,7 @@ "name": "Triangle", "uuid": "b439d97f-3661-45d4-903d-6c739e4ab05f", "practices": [ - "bools" + "bools" ], "prerequisites": [], "difficulty": 1 @@ -321,7 +332,7 @@ "name": "Space Age", "uuid": "76c5078c-9255-44a6-97dd-aab7a1099907", "practices": [ - "dictionaries" + "dictionaries" ], "prerequisites": [], "difficulty": 1 @@ -331,7 +342,7 @@ "name": "House", "uuid": "e0be6456-880b-4cb4-8c62-4479f045fa93", "practices": [ - "loops" + "loops" ], "prerequisites": [], "difficulty": 1 @@ -462,7 +473,7 @@ "name": "Acronym", "uuid": "84e522fc-d042-43fe-8dd2-84c9f1150d1e", "practices": [ - "regular-expressions" + "regular-expressions" ], "prerequisites": [], "difficulty": 2 @@ -472,8 +483,8 @@ "name": "D&D Character", "uuid": "e7702910-5a0a-4180-bef9-9962304ef6c5", "practices": [ - "classes", - "random" + "classes", + "random" ], "prerequisites": [], "difficulty": 2 @@ -498,8 +509,8 @@ "slug": "isbn-verifier", "name": "Isbn Verifier", "uuid": "c71cfb54-746a-492a-88f8-4258ee9bfe44", - "prerequisites": [], "practices": [], + "prerequisites": [], "difficulty": 2 }, { @@ -515,7 +526,7 @@ "name": "Square Root", "uuid": "84ab45f7-243e-43ee-bd56-4ac6267f4206", "practices": [ - "math" + "math" ], "prerequisites": [], "difficulty": 2 @@ -549,7 +560,7 @@ "name": "Matching Brackets", "uuid": "970494d9-0fba-4ee8-9f9a-f949e6d72ba1", "practices": [ - "conditionals" + "conditionals" ], "prerequisites": [], "difficulty": 2 @@ -567,7 +578,7 @@ "name": "Yacht", "uuid": "48571314-77a4-4b7a-b4d1-9c1626cf2e14", "practices": [ - "enums" + "enums" ], "prerequisites": [], "difficulty": 2 @@ -651,11 +662,11 @@ "name": "Allergies", "uuid": "ed2cb05a-97e9-4a4c-b6d6-a9748d7436e8", "practices": [ - "bitwise-operators" + "bitwise-operators" ], "prerequisites": [], "difficulty": 3 - }, + }, { "slug": "nth-prime", "name": "Nth Prime", @@ -679,7 +690,7 @@ "name": "Kindergarten Garden", "uuid": "3cbb336f-9824-46a2-817d-d7a6810f5778", "practices": [ - "classes" + "classes" ], "prerequisites": [], "difficulty": 3 @@ -688,7 +699,9 @@ "slug": "simple-cipher", "name": "Simple Cipher", "uuid": "d76c645e-d665-4e2b-9cee-fbb97572e9fd", - "practices": ["classes"], + "practices": [ + "classes" + ], "prerequisites": [], "difficulty": 3 }, @@ -731,7 +744,9 @@ "slug": "circular-buffer", "name": "Circular Buffer", "uuid": "a4693b2e-3450-4391-aa34-927f86030d04", - "practices": ["classes"], + "practices": [ + "classes" + ], "prerequisites": [], "difficulty": 3 }, @@ -827,7 +842,8 @@ ], "prerequisites": [], "difficulty": 4 - },{ + }, + { "slug": "rail-fence-cipher", "name": "Rail Fence Cipher", "uuid": "33012310-6494-47ff-a29f-6cc168fe12b4", @@ -959,7 +975,9 @@ "slug": "binary-search-tree", "name": "Binary Search Tree", "uuid": "3cf07ef7-5445-4f5d-b60d-cca72ef07935", - "practices": ["classes"], + "practices": [ + "classes" + ], "prerequisites": [], "difficulty": 5 }, @@ -967,7 +985,9 @@ "slug": "rational-numbers", "name": "Rational Numbers", "uuid": "5d76a98a-f130-41b3-af1f-1b8d32d2f6e6", - "practices": ["operator-overloading"], + "practices": [ + "operator-overloading" + ], "prerequisites": [], "difficulty": 5 }, @@ -1063,7 +1083,9 @@ "slug": "bowling", "name": "Bowling", "uuid": "f374b4a0-d2a2-40c2-bd41-215b0fd64316", - "practices": ["classes"], + "practices": [ + "classes" + ], "prerequisites": [], "difficulty": 6 }, @@ -1151,10 +1173,10 @@ "slug": "scale-generator", "name": "Scale Generator", "uuid": "c2eaec94-826e-44e2-b92d-827a713dd373", - "status": "deprecated", "practices": [], "prerequisites": [], - "difficulty": 5 + "difficulty": 5, + "status": "deprecated" } ] }, @@ -1163,6 +1185,11 @@ "uuid": "5151f982-fa99-494e-9036-af7e6a3af86f", "slug": "basics", "name": "Basics" + }, + { + "uuid": "2981782d-98dd-4221-8936-b71d10b0fc59", + "slug": "bools", + "name": "Booleans" } ], "key_features": [ @@ -1198,11 +1225,11 @@ } ], "tags": [ - "paradigm/procedural", - "typing/dynamic", "execution_mode/interpreted", - "platform/windows", + "paradigm/procedural", + "platform/linux", "platform/mac", - "platform/linux" + "platform/windows", + "typing/dynamic" ] } diff --git a/exercises/concept/pacmans-powerful-pursuit/.docs/hints.md b/exercises/concept/pacmans-powerful-pursuit/.docs/hints.md new file mode 100644 index 0000000..6f53f48 --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/.docs/hints.md @@ -0,0 +1,37 @@ +# Hints + +## General + +- Don't worry about how the arguments are _derived_, focus on combining the arguments to return the intended result. + +## 0. Define a state of the machine + +- Define a variable name `PowerOn` with a truthy [boolean][booleans] value. + +## 1. Define if Pac-Man can eat a ghost + +- You can use the `-and` [operator][logical-operators] to combine arguments for a result. + + +## 2. Define if Pac-Man scores + +- You can use the `-or` [operator][logical-operators] to combine arguments for a result. + + +## 3. Define if Pac-Man loses + +- You can use the `-not` [operator][logical-operators] to combine arguments for a result. + + +## 4. Define if Pac-Man wins + +- Combined the previous [operators][logical-operators] to get the result. + + +## 5. Write SYNOPSIS for winning condition + +- Write a short description in the comment block for the last function `Win` using the `SYNOPSIS` [keyword][keywords]. + +[logical-operators]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logical_operators +[keywords]: https://learn.microsoft.com/en-us/powershell/scripting/developer/help/comment-based-help-keywords +[booleans]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_booleans \ No newline at end of file diff --git a/exercises/concept/pacmans-powerful-pursuit/.docs/instructions.md b/exercises/concept/pacmans-powerful-pursuit/.docs/instructions.md new file mode 100644 index 0000000..cde8b2a --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/.docs/instructions.md @@ -0,0 +1,73 @@ +# Instructions + +In this exercise, you need to implement some rules from [Pac-Man][Pac-Man], the classic 1980s-era arcade-game. + +There are six tasks in total, four of them are rules related to the game states. + +> _Do not worry about how the arguments are derived in functions, just focus on combining the arguments to return the intended result._ + + +## 0. Define a power state + +Define a variable named `PowerOn` with a value to represent that the power is indeed on. + +```powershell +> $PowerOn +True +``` + +## 1. Define if Pac-Man eats a ghost + +Define the `EatGhost` function that takes two parameters (_if Pac-Man has a power pellet active_ and _if Pac-Man is touching a ghost_) and returns a Boolean value if Pac-Man is able to eat the ghost. +The function should return `True` only if Pac-Man has a power pellet active and is touching a ghost. + +```powershell +> EatGhost -ActivePower $false -TouchingGhost $true +False +``` + +## 2. Define if Pac-Man scores + +Define the `Score` function that takes two parameters (_if Pac-Man is touching a power pellet_ and _if Pac-Man is touching a dot_) and returns a Boolean value if Pac-Man scored. +The function should return `True` if Pac-Man is touching a power pellet or a dot. + +```powershell +> Score -TouchDot $true -TouchPowerPellet $true +4 +``` + +## 3. Define if Pac-Man loses + +Define the `Lose` function that takes two parameters (_if Pac-Man has a power pellet active_ and _if Pac-Man is touching a ghost_) and returns a Boolean value if Pac-Man loses. +The function should return `True` if Pac-Man is touching a ghost and does not have a power pellet active. + +```powershell +> Lose -ActivePower $false -TouchingGhost $true +True +``` + +## 4. Define if Pac-Man wins + +Define the `Win` function that takes three parameters (_if Pac-Man has eaten all of the dots_, _if Pac-Man has a power pellet active_, and _if Pac-Man is touching a ghost_) and returns a Boolean value if Pac-Man wins. +The function should return `True` if Pac-Man has eaten all of the dots and has not lost based on the parameters defined in part 3. + +```powershell +> Win -EatenAllDots $false -ActivePower $true -TouchingGhost $false +False +``` + +## 5. Write Synopsis for winning condition + +Go back to the last function, add a `Synopsis` section to the comment block as a short description of how to win the game. +The description should be at minimum ten characters long. + +```powershell +function MyFunc($Arg) { + <# + .DESCRIPTION + This is a demonstration of the comment-based help with the description keyword. + #> +} +``` + +[Pac-Man]: https://en.wikipedia.org/wiki/Pac-Man \ No newline at end of file diff --git a/exercises/concept/pacmans-powerful-pursuit/.docs/introduction.md b/exercises/concept/pacmans-powerful-pursuit/.docs/introduction.md new file mode 100644 index 0000000..3d94f9e --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/.docs/introduction.md @@ -0,0 +1,55 @@ +# Introduction + + +## Booleans + +PowerShell has the [`bool`][booleans] type to represents true and false values. +In this type there are only two values: `True` and `False`. +You can bind these values to variables with the prefix `$`: + +```powershell +> $TrueVar = $true +> $FalseVar = $FALSE +#Case senstitivity doesn't matter here +``` + +We can use [logical operators][logical-operators] like `-and`, `-or`, and `-not` to combine and evaluate Boolean expressions. + +```powershell +> $TrueVar = $true -and $true +> $FalseVar = $true -and $false + +> $TrueVar = $true -or $false +> $FalseVar = $false -or $false + +> $TrueVar = -not $false +> $FalseVar = -not $true +``` + + +## Comment-based help + +[`Comment-based help`][comment-based help] in PowerShell helps provide detailed infomation for functions and scripts written in comments. +It use special help comment keywords to specify the topics in focus, e.g `.SYNOPSIS`, `.EXAMPLE` or `.NOTES`. + +```powershell +function ExampleFunction($Arg) { + <# + .DESCRIPTION + A detailed description of the function or script. This keyword can be used only once in each topic. + + .PARAMETER Arg + The description of a parameter, it must be follow with the parameter name. + #> +} +``` + +You can display the comment-based help infomation using the cmdlet `Get-Help`. + +```powershell +> Get-Help -Name "ExampleFunction" +``` + +[booleans]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_booleans +[logical-operators]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logical_operators +[comment-based help]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help diff --git a/exercises/concept/pacmans-powerful-pursuit/.meta/Pacman.example.ps1 b/exercises/concept/pacmans-powerful-pursuit/.meta/Pacman.example.ps1 new file mode 100644 index 0000000..50311a8 --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/.meta/Pacman.example.ps1 @@ -0,0 +1,52 @@ +New-Variable -Name "PowerOn" -Value $true + +function EatGhost($ActivePower, $TouchingGhost) { + <# + .PARAMETER ActivePower + Boolean value - does the player have an active power pellet? + + .PARAMETER TouchingGhost + Boolean value - is the player touching a ghost? + #> + $ActivePower -and $TouchingGhost +} + +function Score($TouchPowerPellet, $TouchDot) { + <# + .PARAMETER TouchPellet + Boolean value - does the player have an active power pellet? + + .PARAMETER TouchDot + Boolean value - is the player touching a ghost? + #> + $TouchPowerPellet -or $TouchDot +} + +function Lose($ActivePower, $TouchingGhost) { + <# + .PARAMETER ActivePower + Boolean value - does the player have an active power pellet? + + .PARAMETER TouchingGhost + Boolean value - is the player touching a ghost? + #> + (-not $ActivePower) -and $TouchingGhost +} + + +function Win($EatenAllDots, $ActivePower, $TouchingGhost) { + <# + .SYNOPSIS + Function to check if the game has been won. + + .PARAMETER EatenAllDots + Boolean value - does the player have an active power pellet? + + .PARAMETER ActivePower + Boolean value - is the player touching a ghost? + + .PARAMETER TouchingGhost + Boolean value - is the player touching a ghost? + #> + $EatenAllDots -and -not (Lose $ActivePower $TouchingGhost) +} diff --git a/exercises/concept/pacmans-powerful-pursuit/.meta/config.json b/exercises/concept/pacmans-powerful-pursuit/.meta/config.json new file mode 100644 index 0000000..c923107 --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/.meta/config.json @@ -0,0 +1,21 @@ +{ + "authors": [ + "glaxxie" + ], + "files": { + "solution": [ + "Pacman.ps1" + ], + "test": [ + "Pacman.tests.ps1" + ], + "exemplar": [ + ".meta/Pacman.example.ps1" + ] + }, + "forked_from": [ + "python/ghost-gobble-arcade-game" + ], + "icon": "pacman-rules", + "blurb": "Learn about bools by setting up the rules for the Pacman arcade game." +} diff --git a/exercises/concept/pacmans-powerful-pursuit/.meta/design.md b/exercises/concept/pacmans-powerful-pursuit/.meta/design.md new file mode 100644 index 0000000..c898094 --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/.meta/design.md @@ -0,0 +1,39 @@ +# Design + +## Goal + +The goal of this exercise is to teach the student about `boolean` values and logical operators in powershell. +It also introduce comment block as `comment based help`. + + +## Learning objectives + +- Create a `bool` object via literal declaration +- Create a `bool` object from using logical operators (`and`, `or`, `not`) +- Create comment block and write `comment-based help` + + +## Out of scope + +- Obtain `bool` object from: + - Comparison: `-gt`, `-lt`, `-eq`, `-ne`, etc + - Membership: `-in`, `-contains`, `-haskey`, etc + - Identity: `-is` + - Collection types +- Orders of evaluation + +## Concepts + +**booleans:** +- Know about `bool` type and its two value: `$true` and `$false` +- Know about logicals operators and use them to build expression +- Know boolean operator precedence + +**comment based help** +- Know about comment block +- Know how to write comment-base help using keywords and comment block + + +## Prerequisites + +- `basics` diff --git a/exercises/concept/pacmans-powerful-pursuit/Pacman.ps1 b/exercises/concept/pacmans-powerful-pursuit/Pacman.ps1 new file mode 100644 index 0000000..233792b --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/Pacman.ps1 @@ -0,0 +1,51 @@ +New-Variable -Name "PowerOn" -Value $true + +function EatGhost($ActivePower, $TouchingGhost) { + <# + .PARAMETER ActivePower + Boolean value - does the player have an active power pellet? + + .PARAMETER TouchingGhost + Boolean value - is the player touching a ghost? + #> + Throw "Please implement this function" +} + +function Score($TouchPowerPellet, $TouchDot) { + <# + .PARAMETER TouchPellet + Boolean value - does the player have an active power pellet? + + .PARAMETER TouchDot + Boolean value - is the player touching a ghost? + #> + Throw "Please implement this function" +} + +function Lose($ActivePower, $TouchingGhost) { + <# + .PARAMETER ActivePower + Boolean value - does the player have an active power pellet? + + .PARAMETER TouchingGhost + Boolean value - is the player touching a ghost? + #> + Throw "Please implement this function" +} + + +function Win($EatenAllDots, $ActivePower, $TouchingGhost) { + <# + #Please add a synopsis for this function + + .PARAMETER EatenAllDots + Boolean value - does the player have an active power pellet? + + .PARAMETER ActivePower + Boolean value - is the player touching a ghost? + + .PARAMETER TouchingGhost + Boolean value - is the player touching a ghost? + #> + Throw "Please implement this function" +} diff --git a/exercises/concept/pacmans-powerful-pursuit/Pacman.tests.ps1 b/exercises/concept/pacmans-powerful-pursuit/Pacman.tests.ps1 new file mode 100644 index 0000000..a3501d5 --- /dev/null +++ b/exercises/concept/pacmans-powerful-pursuit/Pacman.tests.ps1 @@ -0,0 +1,96 @@ +BeforeAll { + . "./Pacman.ps1" +} + +Describe "Test Pac-Man Game Rules" { + Context "Task 0" { + It "the power is on" { + (Get-Variable -Name "PowerOn").Value | Should -BeTrue + } + } + + Context "Task 1" { + It "ghost got eaten" { + $got = EatGhost -ActivePower $true -TouchingGhost $true + $got | Should -BeTrue + } + + It "ghost does not get eaten because no power pellet active" { + $got = EatGhost -ActivePower $false -TouchingGhost $true + $got | Should -BeFalse + } + + It "ghost does not get eaten because not touching ghost" { + $got = EatGhost -ActivePower $true -TouchingGhost $false + $got | Should -BeFalse + } + + It "ghost does not get eaten because not touching ghost and not having pellet" { + $got = EatGhost -ActivePower $false -TouchingGhost $false + $got | Should -BeFalse + } + } + + Context "Task 2" { + It "score when eating dot" { + $got = Score -TouchPowerPellet $false -TouchDot $true + $got | Should -BeTrue + } + + It "score when eating power pellet" { + $got = Score -TouchPowerPellet $true -TouchDot $false + $got | Should -BeTrue + } + + It "no score when nothing eaten" { + $got = Score -TouchPowerPellet $false -TouchDot $false + $got | Should -BeFalse + } + } + + Context "Task 3" { + It "lose if touching a ghost without a power pellet active" { + $got = Lose -ActivePower $false -TouchingGhost $true + $got | Should -BeTrue + } + + It "dont lose if touching a ghost with a power pellet active" { + $got = Lose -ActivePower $true -TouchingGhost $true + $got | Should -BeFalse + } + + It "dont lose if not touching a ghost" { + $got = Lose -ActivePower $true -TouchingGhost $false + $got | Should -BeFalse + } + } + + Context "Task 4" { + It "win if all dots eaten" { + $got = Win -EatenAllDots $true -ActivePower $false -TouchingGhost $false + $got | Should -BeTrue + } + + It "win if all dots eaten and touching a ghost with a power pellet active" { + $got = Win -EatenAllDots $true -ActivePower $true -TouchingGhost $true + $got | Should -BeTrue + } + + It "dont win if not all dots eaten" { + $got = Win -EatenAllDots $false -ActivePower $true -TouchingGhost $true + $got | Should -BeFalse + } + + It "dont win if all dots eaten but touching a ghost" { + $got = Win -EatenAllDots $true -ActivePower $false -TouchingGhost $true + $got | Should -BeFalse + } + } + + Context "Task 5" { + It "function has Synopsis for comment-base help with minimum len of 10" { + $got = (Get-Help -Name "Win").Synopsis + $got.Length | Should -BeGreaterOrEqual 10 -Because "Synopsis need to be at minimum 10 chars" + } + } +}