summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMike Frysinger2008-02-15 01:42:28 +0000
committerMike Frysinger2008-02-15 01:42:28 +0000
commit25cd7fd702f6439e0fddce162bd197ff77944ebf (patch)
treef61ed8d2f431b7f6880e9896b6dce30c9eadaede /testsuite
parent1e47c429bf6283d441dcebb16a48ae11bff211d2 (diff)
downloadbusybox-25cd7fd702f6439e0fddce162bd197ff77944ebf.zip
busybox-25cd7fd702f6439e0fddce162bd197ff77944ebf.tar.gz
add a test case for usage strings to catch people forgetting to add trailing escape in middle of usage
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/all_sourcecode.tests14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/all_sourcecode.tests b/testsuite/all_sourcecode.tests
index a537dce..86f61b7 100755
--- a/testsuite/all_sourcecode.tests
+++ b/testsuite/all_sourcecode.tests
@@ -16,6 +16,20 @@
#
+# 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.
#