aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/mbprintf4.awk51
-rw-r--r--test/mbprintf4.ok144
3 files changed, 104 insertions, 96 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index ab6c9431..e28ac2bb 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-09 Arnold D. Robbins <arnold@skeeve.com>
+
+ * mbprintf4.awk: Add record and line number for debugging.
+ * mpprint4.ok: Adjust.
+
2014-11-02 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (profile7): New test.
diff --git a/test/mbprintf4.awk b/test/mbprintf4.awk
index a4b2a218..1e436bca 100644
--- a/test/mbprintf4.awk
+++ b/test/mbprintf4.awk
@@ -1,32 +1,35 @@
# printf with multi-byte text encoding, %c and %s, width and precision, and left-alignment.
{
- print "printf %c " $0
- printf "|%c|\n", $0
- printf "|%1c|\n", $0
- printf "|%3c|\n", $0
+ count = 1
+
+ print NR, count++, "printf %c " $0
+ printf "%d:%d: |%c|\n", NR, count++, $0
+ printf "%d:%d: |%1c|\n", NR, count++, $0
+ printf "%d:%d: |%3c|\n", NR, count++, $0
# precision is ignored by %c.
- printf "|%3.1c|\n", $0
- printf "|%3.5c|\n", $0
- print "printf %-c " $0
- printf "|%-c|\n", $0
- printf "|%-1c|\n", $0
- printf "|%-3c|\n", $0
+ printf "%d:%d: |%3.1c|\n", NR, count++, $0
+ printf "%d:%d: |%3.5c|\n", NR, count++, $0
+ print NR, count++, "printf %-c " $0
+ printf "%d:%d: |%-c|\n", NR, count++, $0
+ printf "%d:%d: |%-1c|\n", NR, count++, $0
+ printf "%d:%d: |%-3c|\n", NR, count++, $0
# precision is ignored by %c.
- printf "|%-3.1c|\n", $0
- printf "|%-3.5c|\n", $0
+ printf "%d:%d: |%-3.1c|\n", NR, count++, $0
+ printf "%d:%d: |%-3.5c|\n", NR, count++, $0
printf ORS
- print "printf %s " $0
- printf "|%s|\n", $0
- printf "|%1s|\n", $0
- printf "|%3s|\n", $0
- printf "|%3.1s|\n", $0
- printf "|%3.5s|\n", $0
- print "printf %-s " $0
- printf "|%-s|\n", $0
- printf "|%-1s|\n", $0
- printf "|%-3s|\n", $0
- printf "|%-3.1s|\n", $0
- printf "|%-3.5s|\n", $0
+ print NR, count++, "printf %s " $0
+ printf "%d:%d: |%s|\n", NR, count++, $0
+ printf "%d:%d: |%1s|\n", NR, count++, $0
+ printf "%d:%d: |%3s|\n", NR, count++, $0
+ printf "%d:%d: |%3.1s|\n", NR, count++, $0
+ printf "%d:%d: |%3.5s|\n", NR, count++, $0
+
+ print NR, count++, "printf %-s " $0
+ printf "%d:%d: |%-s|\n", NR, count++, $0
+ printf "%d:%d: |%-1s|\n", NR, count++, $0
+ printf "%d:%d: |%-3s|\n", NR, count++, $0
+ printf "%d:%d: |%-3.1s|\n", NR, count++, $0
+ printf "%d:%d: |%-3.5s|\n", NR, count++, $0
printf ORS ORS
}
diff --git a/test/mbprintf4.ok b/test/mbprintf4.ok
index 9b9dd4e2..e32fe408 100644
--- a/test/mbprintf4.ok
+++ b/test/mbprintf4.ok
@@ -1,81 +1,81 @@
-printf %c ú
-|ú|
-|ú|
-| ú|
-| ú|
-| ú|
-printf %-c ú
-|ú|
-|ú|
-|ú |
-|ú |
-|ú |
+1 1 printf %c ú
+1:2: |ú|
+1:3: |ú|
+1:4: | ú|
+1:5: | ú|
+1:6: | ú|
+1 7 printf %-c ú
+1:8: |ú|
+1:9: |ú|
+1:10: |ú |
+1:11: |ú |
+1:12: |ú |
-printf %s ú
-|ú|
-|ú|
-| ú|
-| ú|
-| ú|
-printf %-s ú
-|ú|
-|ú|
-|ú |
-|ú |
-|ú |
+1 13 printf %s ú
+1:14: |ú|
+1:15: |ú|
+1:16: | ú|
+1:17: | ú|
+1:18: | ú|
+1 19 printf %-s ú
+1:20: |ú|
+1:21: |ú|
+1:22: |ú |
+1:23: |ú |
+1:24: |ú |
-printf %c último
-|ú|
-|ú|
-| ú|
-| ú|
-| ú|
-printf %-c último
-|ú|
-|ú|
-|ú |
-|ú |
-|ú |
+2 1 printf %c último
+2:2: |ú|
+2:3: |ú|
+2:4: | ú|
+2:5: | ú|
+2:6: | ú|
+2 7 printf %-c último
+2:8: |ú|
+2:9: |ú|
+2:10: |ú |
+2:11: |ú |
+2:12: |ú |
-printf %s último
-|último|
-|último|
-|último|
-| ú|
-|últim|
-printf %-s último
-|último|
-|último|
-|último|
-|ú |
-|últim|
+2 13 printf %s último
+2:14: |último|
+2:15: |último|
+2:16: |último|
+2:17: | ú|
+2:18: |últim|
+2 19 printf %-s último
+2:20: |último|
+2:21: |último|
+2:22: |último|
+2:23: |ú |
+2:24: |últim|
-printf %c áé
-|á|
-|á|
-| á|
-| á|
-| á|
-printf %-c áé
-|á|
-|á|
-|á |
-|á |
-|á |
+3 1 printf %c áé
+3:2: |á|
+3:3: |á|
+3:4: | á|
+3:5: | á|
+3:6: | á|
+3 7 printf %-c áé
+3:8: |á|
+3:9: |á|
+3:10: |á |
+3:11: |á |
+3:12: |á |
-printf %s áé
-|áé|
-|áé|
-| áé|
-| á|
-| áé|
-printf %-s áé
-|áé|
-|áé|
-|áé |
-|á |
-|áé |
+3 13 printf %s áé
+3:14: |áé|
+3:15: |áé|
+3:16: | áé|
+3:17: | á|
+3:18: | áé|
+3 19 printf %-s áé
+3:20: |áé|
+3:21: |áé|
+3:22: |áé |
+3:23: |á |
+3:24: |áé |