From bdb0e5fd6e031f9b3fae95d8180cf6bba32384c8 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 8 Feb 2021 01:50:28 -0600 Subject: Yi-Yo Chiang pointed out install -D was broken when the target file exists. Add a test, with comment that "make install_test" doesn't currently exist... --- tests/install.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tests/install.test (limited to 'tests') diff --git a/tests/install.test b/tests/install.test new file mode 100755 index 00000000..228d2470 --- /dev/null +++ b/tests/install.test @@ -0,0 +1,15 @@ +#!/bin/bash + +# TODO: fill this out. +# TODO: "make install" means something else, so no test_install, only callable +# from "make tests"... + +[ -f testing.sh ] && . testing.sh + +#testing "name" "command" "result" "infile" "stdin" + +dd if=/dev/urandom of=random bs=64 count=1 2> /dev/null +testing "install -D exists" \ + "mkdir -p a; touch a/b; install -D random a/b && cmp random a/b && echo yes" \ + "yes\n" "" "" +rm -rf a random -- cgit v1.2.3