-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests
More file actions
executable file
·28 lines (23 loc) · 837 Bytes
/
run_tests
File metadata and controls
executable file
·28 lines (23 loc) · 837 Bytes
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
#!/usr/bin/env bash
#
#------------------------------------------------------------------------------
# run_tests
# Copyright (C) 2024 Jacob Kochems <jacobkochems+git@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
#------------------------------------------------------------------------------
#
# Run some basic tests
#
set -e -o pipefail
#---( create test environment )------------------------------------------------
mkdir --parents ./tests
touch ./tests/actual-file
# relative symlinks
ln -sf actual-file ./tests/symlink-1
ln -sf symlink-1 ./tests/symlink-2
# absolute symlinks
path="$(realpath --no-symlinks ./tests)"
ln -sf "$path"/actual-file "$path"/symlink-a
ln -sf "$path"/symlink-a "$path"/symlink-b
#---( run tests )--------------------------------------------------------------
./tracelink tests/symlink-{2,b}