#!/bin/sh # Verify the = modifier of tmpfiles, what is of another kind than the # entry makes is removed first set -eu TEST_DIR=$(dirname "$0") DIR=/tmp/match CONF=/tmp/match.conf kind() { texec stat -c %F "$1" } test_teardown() { say "Running test teardown." run "rm -rf $DIR $CONF" } # shellcheck source=/dev/null . "$TEST_DIR/lib/setup.sh" setup() { run "rm -rf $DIR; mkdir -p $DIR/dir/sub $DIR/same; mkfifo $DIR/fifo $DIR/parent; echo old > $DIR/file; echo old > $DIR/keep; echo old > $DIR/link; echo same > $DIR/same/file" } conf() { run "cat > $CONF" <