diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-08 04:02:52 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-08 04:02:52 -0600 |
commit | ef5956962675d7cb1bdb76a2fc45760b002a570c (patch) | |
tree | 54fa10580413b4b1dfbd9b22a52fffca834f772e /libmisc/tests/test_obj_autobox.c.gen | |
parent | 53d0b11262177cd212803fc9330e055871c348b3 (diff) | |
parent | db1b4b4cc41c84ec4c8e11418431a1ab2a1001c5 (diff) |
Merge branch 'lukeshu/fix-obj-box'
Diffstat (limited to 'libmisc/tests/test_obj_autobox.c.gen')
-rwxr-xr-x | libmisc/tests/test_obj_autobox.c.gen | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libmisc/tests/test_obj_autobox.c.gen b/libmisc/tests/test_obj_autobox.c.gen new file mode 100755 index 0000000..3cfa3d4 --- /dev/null +++ b/libmisc/tests/test_obj_autobox.c.gen @@ -0,0 +1,17 @@ +#!/bin/sh +# libmisc/tests/test_obj_autobox.c.gen - Generate tests for LO_BOX() +# +# Copyright (C) 2025 Luke T. Shumaker <lukeshu@lukeshu.com> +# SPDX-License-Identifier: AGPL-3.0-or-later + +infile=$1 +outfile=$2 + +grep --quiet lo_box_ -- "$infile" + +{ + echo "/* ${outfile} - Generated by \`$*\`. DO NOT EDIT! */" + sed -E 's/lo_box_([a-z0-9_]+)_as_([a-z0-9_]+)\(/LO_BOX(\2, /g' <"$infile" +} >"$outfile" + +! grep -H lo_box_ -- "$outfile" |