# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# Tests for azure.policy.fn.starts_with
builtin: azure.policy.fn.starts_with

cases:
  - note: starts_with_true
    args: ["hello world", "hello"]
    want: true

  - note: starts_with_false
    args: ["hello world", "world"]
    want: false

  - note: starts_with_case_insensitive
    args: ["Hello World", "hello"]
    want: true

  - note: starts_with_empty_needle
    args: ["hello", ""]
    want: true

  - note: starts_with_empty_haystack
    args: ["", "hello"]
    want: false

  - note: starts_with_both_empty
    args: ["", ""]
    want: true

  - note: starts_with_exact_match
    args: ["hello", "hello"]
    want: true

  - note: starts_with_longer_needle
    args: ["hi", "hello"]
    want: false
