rafritts / bunit

A unit testing framework for Shell scripts - namely Bash.
MIT License
197 stars 11 forks source link

shopt -s nullglob #44

Open mikeshaw opened 4 years ago

mikeshaw commented 4 years ago

[bash --version = GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)] Hi, I'm not sure if this project is still being maintained but I've noticed an issue when testing a script containing:

shopt -s nullglob

Specifically, it breaks bunit.shl - something to do with passing the parameter-array (args[@]) from the assert* functions to __assert and usually fixed with judicious use of quotes. Happy to concede that this is likely to be a low-frequency problem :-) I started using the nullglob option after reading this guide to improving Bash scripts

rafritts commented 2 years ago

Hey Mike, I apologize for taking so long to respond. Is this still an issue for you? If so I can try to work on a solution.

mikeshaw commented 2 years ago

Hi Ryan, no need to apologise. I was unable to use bunit due to the issue I highlighted so afaik the problem still exists but it is not specifically an issue for me. Up to you if you'd like to fix it - I'm happy to provide further info if that would help.

Many thanks, Mike

On Fri, 27 May 2022 at 00:03, Ryan Fritts @.***> wrote:

Hey Mike, I apologize for taking so long to respond. Is this still an issue for you? If so I can try to work on a solution.

— Reply to this email directly, view it on GitHub https://github.com/rafritts/bunit/issues/44#issuecomment-1139099427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHSLZPP2XDYCYIRUNKJZXTVL7YKXANCNFSM4T4TSHHA . You are receiving this because you authored the thread.Message ID: @.***>