summaryrefslogtreecommitdiff
path: root/support/dktools/test-dk4str8.ctr
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/dktools/test-dk4str8.ctr
Initial commit
Diffstat (limited to 'support/dktools/test-dk4str8.ctr')
-rw-r--r--support/dktools/test-dk4str8.ctr40
1 files changed, 40 insertions, 0 deletions
diff --git a/support/dktools/test-dk4str8.ctr b/support/dktools/test-dk4str8.ctr
new file mode 100644
index 0000000000..9d22ae90f7
--- /dev/null
+++ b/support/dktools/test-dk4str8.ctr
@@ -0,0 +1,40 @@
+
+
+#include "dk4conf.h"
+#include "dk4types.h"
+
+#include <stdio.h>
+
+#include "dk4mem.h"
+#include "dk4error.h"
+#include "dk4str8.h"
+
+
+int main(void)
+{
+ char buffer[256];
+ char *p1;
+ char *p2;
+ $!trace-init test-dk4str8.deb
+ $? "+ main"
+ while(NULL != fgets(buffer, sizeof(buffer), stdin)) {
+ dk4str8_normalize(buffer, NULL);
+ p1 = dk4str8_start(buffer, NULL);
+ if (NULL != p1) {
+ p2 = dk4str8_next(p1, NULL);
+ if (NULL != p2) {
+ printf("p1 = \"%s\"\n", p1);
+ printf("p2 = \"%s\"\n", p2);
+ if (dk4str8_is_abbr(p1, p2, '$', 1)) {
+ printf("yes\n");
+ } else {
+ printf("no\n");
+ }
+ }
+ }
+ }
+ $? "- main"
+ $!trace-end
+ return 0;
+}
+