TypedDevs / bashunit

A simple testing library for bash scripts. Test your bash scripts in the fastest and simplest way, discover the most modern bash testing library.
https://bashunit.typeddevs.com
MIT License
270 stars 21 forks source link

feat: add multi-invokers #250

Closed ceejatec closed 2 months ago

ceejatec commented 2 months ago

Multi-invokers are a new feature to complement data providers, with greater flexibility: allowing for multiple parameters to be passed to the test function, and for parameters containing whitespace.

📚 Description

Multi-invokers are a new feature to complement data providers, with greater flexibility: allowing for multiple parameters to be passed to the test function, and for parameters containing whitespace.

🔖 Changes

Extended the core runner:run_test function to accept arbitrary arguments to pass to test function. Always use "$@" to pass through arguments so they are properly quoted! Created new "parameterized tests" doc page, which documents multi-invokers and incorporates the doc for data providers which was previously at the bottom of the test-files page.

✅ To-do list

ceejatec commented 2 months ago

PR from wrong branch.