Skip to content

Add public assert_associative_array helper #148

Description

@codeforester

Problem

The stdlib exposes assert_indexed_array for caller-owned indexed-array APIs, but associative-array APIs currently need to call the internal __std_declares_array_kind__ helper directly. arg_parse does this to validate its options map.

A public associative-array assertion would make future named-array APIs cleaner and avoid spreading internal helper calls across companion libraries.

Fix

Add assert_associative_array to lib/bash/std/lib_std.sh, document it in the stdlib README, add BATS coverage, and migrate arg_parse to use it.

Validation

  • Focused stdlib and arg BATS coverage
  • ./tests/validate.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or product improvement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions