add a test case for usage strings to catch people forgetting to add trailing escape...
authorMike Frysinger <vapier@gentoo.org>
Fri, 15 Feb 2008 01:42:28 +0000 (01:42 -0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 15 Feb 2008 01:42:28 +0000 (01:42 -0000)
testsuite/all_sourcecode.tests

index a537dcee9a3d7fd5c87901ffd7ec0fce61b005e4..86f61b7c3a22051b7e126fc5c298db6b6ffc2678 100755 (executable)
 [ -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.