← Commit list

25cd7fd70

Mike Frysinger
Mike Frysinger
2008-02-15
FAILED Duration: 17s

Subject

add a test case for usage strings to catch people forgetting to add trailing escape in middle of usage

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

testsuite/all_sourcecode.tests+14 -0
@@ -15,6 +15,20 @@
[ -s "$srcdir/../include/applets.h" ] || exit 0
+#
+# make sure all usage strings are properly escaped. oftentimes people miss
+# an escape sequence so we end up with:
+# #define foo_usage \
+# " this line is ok" \
+# " as is this line"
+# " but this one is broken as the \ is missing from above"
+#
+${CROSS_COMPILE}cpp -dD -P $srcdir/../include/usage.h \
+ | sed -e '/^#define/d' -e '/^$/d' > src.usage.escaped
+testing "Usage strings escaped" "cat src.usage.escaped" "" "" ""
+rm -f src.usage.escaped
+
+
#
# verify the applet order is correct in applets.h, otherwise
# applets won't be called properly.