From c3d9601e880d8375d4d198e0be2406efd2b064f7 Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Sun, 5 Sep 2021 21:16:48 -0500 Subject: Make tests a flat directory --- planr-cfg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'planr-cfg') 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" -- cgit v1.2.3