From 9b699d7298047b25df0578731a07b32bf51f883e Mon Sep 17 00:00:00 2001 From: emma Date: Mon, 24 Feb 2025 23:17:10 -0700 Subject: [PATCH] Makefile, tests/bonsai/scrut.mk: cleanup --- Makefile | 2 +- tests/bonsai/{scrut.mk => fileis.mk} | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) rename tests/bonsai/{scrut.mk => fileis.mk} (71%) diff --git a/Makefile b/Makefile index 98e2c9f..3e6c0e3 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ build/bin/false: src/false.c build .PHONY: fileis fileis: build/bin/fileis -build/bin/fileis: src/fileis.rs build +build/bin/fileis: src/fileis.rs build rustlibs $(RUSTC) $(RUSTFLAGS) $(RUSTLIBS) -o $@ src/fileis.rs .PHONY: fop diff --git a/tests/bonsai/scrut.mk b/tests/bonsai/fileis.mk similarity index 71% rename from tests/bonsai/scrut.mk rename to tests/bonsai/fileis.mk index e7f421e..2ec2132 100755 --- a/tests/bonsai/scrut.mk +++ b/tests/bonsai/fileis.mk @@ -8,20 +8,20 @@ .PRAGMA: command_comment -.PHONY: scrut_tests -scrut_tests: scrut_help scrut_options +.PHONY: fileis_tests +fileis_tests: fileis_help fileis_options -.PHONY: scrut_help -scrut_help: $(BIN)/scrut - ! $(BIN)/scrut -h +.PHONY: fileis_help +fileis_help: $(BIN)/fileis + ! $(BIN)/fileis -h -.PHONY: scrut_options -# scrut tests file attributes, but files of a certain attribute aren't +.PHONY: fileis_options +# fileis tests file attributes, but files of a certain attribute aren't # guaranteed to be present on a system. This test checks all of the files in # harakit and, if test(1p) says a file matches a certain attribute, then checks -# scrut. +# fileis. # opts are space-delimited (for command splitting), sel is not -scrut_options: $(BIN)/scrut +fileis_options: $(BIN)/fileis set -e; \ opts="b c d e f g k p r s u w x L S"; \ sel=; \ @@ -30,12 +30,12 @@ scrut_options: $(BIN)/scrut for opt in $$opts; \ do if ! printf "%s\n" $$sel | grep $$opt >/dev/null; then \ if test -$$opt "$$f"; then \ - if ! $(BIN)/scrut -$$opt "$$f"; \ - then printf "[!!] scrut -%s failed on %s.\n" \ + if ! $(BIN)/fileis -$$opt "$$f"; \ + then printf "[!!] fileis -%s failed on %s.\n" \ $$opt "$$f"; \ fi; \ sel="$$sel$$opt"; \ - printf "[OK] Tested scrut -%s using %s\n" \ + printf "[OK] Tested fileis -%s using %s\n" \ $$opt "$$f"; \ fi; \ fi; \