blob: 33447e54416d2bd4e45145dc922c8affe8e48fd5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#! /usr/bin/env sh
# nixos-config - My current NixOS configuration
#
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of my nixos-config.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
mkFile() {
t="$1"
mkdir --parents "$(dirname "$t")"
echo "TEST_FILE" >"$t"
}
# We need to hard code this, so that our output matches the golden sample.
base="/tmp/tmp.DfcgjemfCG"
test="$(mktemp --directory -t lf_make_temp_test_XXXXX)"
if [ -d "$base" ]; then
rm --recursive "$base"
fi
mkdir "$base"
cleanup() {
rm --recursive "$base" "$test"
}
trap cleanup EXIT
mkFile "$base/.local/share/file1.txt"
mkFile "$base/.local/state/file1.txt"
mkFile "$base/.local/nvim/log.LOG"
mkFile "$base/.local/.tog/TOG.LOG"
mkFile "$base/.config/apzu/file2.txt"
mkFile "$base/.config/tiamat/file2.txt"
mkFile "$base/.config/lahmu/file2.txt"
mkFile "$base/documents/apzu/file2.txt"
mkFile "$base/documents/tiamat/file2.txt"
mkFile "$base/documents/lahmu/file2.txt"
mkFile "$base/cats/apzu/file2.txt"
mkFile "$base/cats/tiamat/file2.txt"
mkFile "$base/cats/lahmu/file2.txt"
execute_make_maps --home-name "$base" --depth 100 generate "$base/.local" "$base/.config" "$base/documents" "$base/cats" >"$test/output.new"
diff "$test/output.new" "$(dirname "$LOCATION")/output.old"
|