Skip to content

Expectation::toStartWith ​

Member of Expectation

idl
Expectation.toStartWith, prefix, $
  /_expect_failure, $
  /fold_case

Verifies that the expectation value starts with a prefix. For an array of strings, every element must start with the prefix.

Examples ​

idl
(it.expects('sol and luna')).toStartWith, 'sol'
(it.expects('Sol')).toStartWith, 'sol', /fold_case

Arguments ​

prefix ​

requiredinputtype=String

Specify the string that the value should start with.

Keywords ​

_expect_failure {#kw-_expect_failure} ​

optionalinputtype=Boolean

If the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.

fold_case ​

optionalinputtype=Boolean

Set this keyword to ignore case.

Licensed under MIT.