NotHasSuffixFold succeeds if string doesn't have given Go string as suffix after applying Unicode case-folding (so it's a case-insensitive match). Example: str := NewString(t, "Hello World") str.NotHasSuffixFold("Bye")
(value string)
| 829 | // str := NewString(t, "Hello World") |
| 830 | // str.NotHasSuffixFold("Bye") |
| 831 | func (s *String) NotHasSuffixFold(value string) *String { |
| 832 | opChain := s.chain.enter("NotHasSuffix()") |
| 833 | defer opChain.leave() |
| 834 | |
| 835 | if opChain.failed() { |
| 836 | return s |
| 837 | } |
| 838 | |
| 839 | if strings.HasSuffix(strings.ToLower(s.value), strings.ToLower(value)) { |
| 840 | opChain.fail(AssertionFailure{ |
| 841 | Type: AssertNotContainsSubset, |
| 842 | Actual: &AssertionValue{s.value}, |
| 843 | Expected: &AssertionValue{value}, |
| 844 | Errors: []error{ |
| 845 | errors.New("expected: string doesn't have suffix (if folded)"), |
| 846 | }, |
| 847 | }) |
| 848 | } |
| 849 | |
| 850 | return s |
| 851 | } |
| 852 | |
| 853 | // Match matches the string with given regexp and returns a new Match instance |
| 854 | // with found submatches. |