...
1#!/usr/bin/env bats
2
3load common
4
5@test "prelude_bool.mk: TRUE" {
6 check_expr_eq strict '$(if $(TRUE),pass,fail)' 'pass'
7}
8
9@test "prelude_bool.mk: FALSE" {
10 check_expr_eq strict '$(if $(FALSE),fail,pass)' 'pass'
11}
12
13@test "prelude_bool.mk: not TRUE" {
14 check_expr_eq strict '$(if $(call not,$(TRUE)),fail,pass)' 'pass'
15}
16
17@test "prelude_bool.mk: not FALSE" {
18 check_expr_eq strict '$(if $(call not,$(FALSE)),pass,fail)' 'pass'
19}
20
21@test "prelude_bool.mk: not truthy" {
22 check_expr_eq strict '$(if $(call not,truthy),fail,pass)' 'pass'
23}
View as plain text