Compare commits
3 Commits
3880abaa4f
...
74d6ec16ac
Author | SHA1 | Date | |
---|---|---|---|
74d6ec16ac | |||
e93d218b87 | |||
cd5983b10b |
@ -13,6 +13,24 @@ intcmp_tests: intcmp_help intcmp_e intcmp_g intcmp_l intcmp_combined
|
||||
intcmp_help: $(BIN)/intcmp
|
||||
! $(BIN)/intcmp -h
|
||||
|
||||
# These test that integer comparisons are working as they should. For the sake
|
||||
# of readability (to facilitate faster skimming) these recipes follow a
|
||||
# columned format:
|
||||
# $binary -flags d d d d # op
|
||||
# For flag meanings reference intcmp(1) (though they are somewhat self
|
||||
# explanatory). d here refers to a decimal number; a mixture of 1s, 2s, and 3s
|
||||
# (a particularly lovely number) arranged to demonstrate easily the operation
|
||||
# under scrutiny. The commented op is the operation that is true for the given
|
||||
# numbers. For example:
|
||||
# $(BIN)/intcmp -e 3 3 3 3 # ==
|
||||
# op here is ==; 3 == 3 == 3 == 3. The flag being used is -e, to test for
|
||||
# equality, so this test should succeed.
|
||||
# ! $(BIN)/intcmp -l 3 2 1 # >
|
||||
# op here is >; 3 > 2 > 1. The flag being used is -l, to test for each integer
|
||||
# being less than the next, so intcmp should fail - hence the ! at the start of
|
||||
# the invocation. If this test failed, intcmp(1) would be confusing -l for -g,
|
||||
# so that would be a good place to start looking for bugs.
|
||||
|
||||
.PHONY: intcmp_e
|
||||
intcmp_e: $(BIN)/intcmp
|
||||
$(BIN)/intcmp -e 3 3 3 # ==
|
||||
|
15
tests/bonsai/str.mk
Executable file
15
tests/bonsai/str.mk
Executable file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2024 DTB <trinity@trinity.moe>
|
||||
# SPDX-License-Identifier: FSFAP
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice and this
|
||||
# notice are preserved. This file is offered as-is, without any warranty.
|
||||
|
||||
.PRAGMA: command_comment
|
||||
|
||||
.PHONY: str_tests
|
||||
str_tests: str_help
|
||||
|
||||
.PHONY: str_help
|
||||
str_help: $(BIN)/str
|
||||
! $(BIN)/str -h
|
Loading…
Reference in New Issue
Block a user