Skip to content

Commit f09376c

Browse files
committed
readtags: print name fields with escaping as explained in tags(5)
Related to #3559. The original code prints the name fields of pseudo tags with fputs directly. This change uses printValue to print pseudo tags as explained in tags(5). Some of test input files are taken from #3559 submitted by @AmaiKinono. Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 6f054d2 commit f09376c

19 files changed

+124
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG value\ /comment/;"
2+
regular_tag /path/to/file /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG value\\ /comment/;"
2+
regular_tag /path/to/file /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG value\t /comment/;"
2+
regular_tag /path/to/file /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG\ value /comment/;"
2+
regular_tag /path/to/file /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG\\ value /comment/;"
2+
regular_tag /path/to/file /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG\t value /comment/;"
2+
regular_tag /path/to/file /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG value /comment/;"
2+
regular_tag /path/to/file\ /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG value /comment/;"
2+
regular_tag /path/to/file\\ /^pattern$/;" kind:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!_PTAG value /comment/;"
2+
regular_tag /path/to/file\t /^pattern$/;" kind:

0 commit comments

Comments
 (0)