jorgebucaran / fishtape

100% pure-Fish test runner
MIT License
347 stars 20 forks source link

Is it possible to do multiple assertions? #33

Closed edouard-lopez closed 5 years ago

edouard-lopez commented 5 years ago

Is it possible to do multiple assertions?

:warning: This doesn't work:

test "format seconds to human"
    set --local seconds 1000  # express as milliseconds
    '1s' = ( _pure_format_time (math "1*$seconds") $THRESHOLD)
    '59s' = ( _pure_format_time (math "59*$seconds") $THRESHOLD)
end

If so, how can I do it?

jorgebucaran commented 5 years ago

@edouard-lopez No, and I won't be adding this to 2.0. Tests are almost declarative in nature, allowing for fewer bugs and you can always write your imperative code inside a command substitution.

I was too quick to make up my mind. I may actually add this to 2.0.

I'm reopening until I have figured it out.

Wontfix! 🎉