summaryrefslogtreecommitdiff
path: root/planr-cfg
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-05 21:16:48 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-05 21:16:48 -0500
commitc3d9601e880d8375d4d198e0be2406efd2b064f7 (patch)
treeea881275fa0b91976973bfcaccfd8aab61985ca1 /planr-cfg
parentf487121b269f6e76815b4b7b10d42e823350378d (diff)
downloadplanr-auxiliary-tools-main.tar.xz
planr-auxiliary-tools-main.zip
Make tests a flat directoryHEADmain
Diffstat (limited to 'planr-cfg')
-rw-r--r--planr-cfg16
1 files changed, 8 insertions, 8 deletions
diff --git a/planr-cfg b/planr-cfg
index c5d3f1e..dba9683 100644
--- a/planr-cfg
+++ b/planr-cfg
@@ -176,13 +176,13 @@ add_unit() {
local testfile
local name
- name="$(basename $pathspec)"
- name="$(uppercase_str $name)"
+ local base
+ base="$(basename $pathspec)"
+ name="$(uppercase_str $base)"
unitdef="${pathspec}.toml"
- testfile="$(test_dir)/$pathspec"
-
+ testfile="$(test_dir)/$base"
if [[ "$fmt" = "cpp" ]]; then
testfile="${testfile}.cpp"
@@ -191,13 +191,13 @@ add_unit() {
else
die "Format not recognized \"${fmt}\""
fi
-
- create_with_subdirs "$unitdef"
- create_with_subdirs "$testfile"
-
+
local unitdef_abs
unitdef_abs="$(rubric_dir)/${unitdef}"
+ create_with_subdirs "$unitdef_abs"
+ create_with_subdirs "$testfile"
+
if [[ "$fmt" = "cpp" ]]; then
cpp_unitdef "$unitdef" "$name" >"$unitdef_abs"
cpp_boilerplate "$name" >"$testfile"