#! /bin/sh # $NetBSD: tools-bison.sh,v 1.4 2020/04/26 12:46:33 rillig Exp $ # # Tests for mk/tools/bison.mk # set -eu . "./test.subr" bison=$(mock_cmd mock-bison \ --when-args "--version" --then-output "bison 1.5" ) pkg_admin=$(mock_cmd mock-pkg_admin \ --when-args "pmatch bison>=1.0 bison-1.5" --then-exit 0 \ --when-args "pmatch bison>=1.1 bison-1.5" --then-exit 0 \ --when-args "pmatch bison>=2.0 bison-1.5" --then-exit 1 ) if test_case_begin "multiple BISON_REQD entries"; then # A package may add more than one entry to the BISON_REQD list. The # platform-provided bison may only be used if all of the BISON_REQD # entries are below the platform-provided version. create_file "multiple-reqd-entries.mk" <