Functions/Assertions/MatchExactly.Tests.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Set-StrictMode -Version Latest

InModuleScope Pester {
    Describe "MatchExactly" {
        It "returns true for things that match exactly" {
            PesterMatchExactly "foobar" "ob" | Should Be $true
        }

        It "returns false for things that do not match exactly" {
            PesterMatchExactly "foobar" "FOOBAR" | Should Be $false
        }

        It "uses regular expressions" {
            PesterMatchExactly "foobar" "\S{6}" | Should Be $true
        }
    }
}