yaml / yamlscript

Programming in YAML
MIT License
374 stars 32 forks source link

Can't `want: false` in taptest #180

Closed m-dango closed 1 month ago

m-dango commented 1 month ago

Unsure if I'm doing something wrong but I seem to be unable to use false in a taptest check:

#!/usr/bin/env ys-0

require ys::taptest: :all

use: 'leap'

plan: 1

test::
- name: year not divisible by 4 in common year
  eval: leap/is-leap-year(2015)
  want: false
1..1
Error: taptest: Test 1 requires one of: 'want', 'like', 'has'
ingydotnet commented 1 month ago

Yeah that's a bug. It will get fixed and released by tomorrow morning.

ingydotnet commented 1 month ago

Fixed the bug but still shoring up the test framework a bit.

ingydotnet commented 1 month ago

@m-dango left you info in our matrix chat.

ingydotnet commented 1 month ago

I released 0.1.67 which fixes things and more.

I'll write docs for ys::taptest soon but until then this test file can help you figure it out: https://github.com/yaml/yamlscript/blob/main/ys/test/taptest.t

ingydotnet commented 1 month ago

@m-dango The docs for ys::taptest are up here.

I'll be putting out a release with a few more changes today. I'll update the docs when I do.