Skip to content

Commit c6cd8ee

Browse files
committed
Some fixes to ietf/tests.py, and various updated diffs.
- Legacy-Id: 671
1 parent 0ca78de commit c6cd8ee

13 files changed

Lines changed: 34 additions & 19 deletions

ietf/tests.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def module_setup(module):
140140
for item in os.listdir(testdir):
141141
path = testdir + "/" + item
142142
if item.startswith("generic-") and os.path.isfile(path):
143-
chunk = filetext(path).strip()
143+
chunk = filetext(path).rstrip()
144144
chunk = re.sub(r"([\[\]().|+*?])", r"\\\1", chunk)
145145
# @@ -27,0 \+23,1 @@
146146
chunk = re.sub(r"(?m)^@@ -\d+,(\d+) \\\+\d+,(\d+) @@$", r"@@ -\d+,\1 \+\d+,\2 @@", chunk)
@@ -310,30 +310,36 @@ def doUrlsTest(self, lst):
310310
for regex in module.ignores[ignore]:
311311
testtext = re.sub(regex, "", testtext)
312312
goodtext = re.sub(regex, "", goodtext)
313-
testtext = lines(testtext)
314-
goodtext = lines(goodtext)
313+
#log("Checking text: %s" % testtext[:96])
314+
testtext = lines(testtext.strip())
315+
goodtext = lines(goodtext.strip())
315316
if "sort" in codes:
316317
testtext = sorted(testtext)
317318
while testtext and not testtext[0]:
318319
del testtext[0]
320+
while testtext and not testtext[-1]:
321+
del testtext[-1]
319322
goodtext = sorted(goodtext)
320323
while goodtext and not goodtext[0]:
321324
del goodtext[0]
325+
while goodtext and not goodtext[-1]:
326+
del goodtext[-1]
322327
if testtext == goodtext:
323328
note("OK cmp %s" % (url))
324329
else:
325330
contextlines = 0
326331
difflist = list(unified_diff(goodtext, testtext, master, url, "", "", contextlines, lineterm=""))
327332
diff = "\n".join(difflist)
333+
log("Checking diff: %s" % diff[:96])
328334
keys = module.diffchunks.keys()
329335
keys.sort
330336
for key in keys:
331337
chunk = module.diffchunks[key]
332338
if chunk:
333339
if not re.search(chunk, diff):
334-
log("No match: %s" % chunk[:32])
340+
log("No match: %s" % chunk[:96])
335341
while re.search(chunk, diff):
336-
log("Found chunk: %s" % chunk[:32])
342+
log("Found chunk: %s" % chunk[:96])
337343
diff = re.sub(chunk, "", diff)
338344
if len(diff.strip().splitlines()) == 2:
339345
# only the initial 2 lines of the diff remains --
@@ -355,8 +361,8 @@ def doUrlsTest(self, lst):
355361
note("Failed diff: %s" % (url))
356362
else:
357363
note("Diff: %s" % (url))
358-
print "\n".join(difflist[:100])
359-
if len(difflist) > 100:
364+
print "\n".join(diff.split("\n")[:100])
365+
if len(diff.split("\n")) > 100:
360366
print "... (skipping %s lines of diff)" % (len(difflist)-100)
361367
else:
362368
note("OK cmp %s" % (url))

test/diff/_ipr_ipr-657_

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
@@ -49,1 +50,1 @@
1212
-IETF Participant in Section III above)
1313
+the Contact Information above)
14-
@@ -58,0 +59,2 @@
14+
@@ -58,0 +59,3 @@
1515
+VI. Other Notes:
1616
+No information submitted

test/diff/_ipr_ipr-795_

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
+the section "After the panel" from:
1414
+http://www.proper.com/lookit/hash-futures-panel-notes.html
1515
+The patent itself is available from:
16-
@@ -49,1 +48,2 @@
16+
@@ -49,1 +48,3 @@
1717
-covered.
1818
+covered:
1919
+No information submitted

test/diff/_ipr_ipr-834_

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
@@ -70,1 +70,1 @@
2323
-IETF Participant in Section III above)
2424
+the Contact Information above)
25-
@@ -79,0 +79,2 @@
25+
@@ -79,0 +79,3 @@
2626
+VIII. Other Notes:
2727
+No information submitted

test/diff/_ipr_new-generic_

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@
7272
+Same as in Section II above:
7373
@@ -86,1 +90,1 @@
7474
-VI. Other Note(s):
75-
+VI. Other Notes:
75+
+VI. Other Notes:
76+
@@ -88,0 +92,1 @@

test/diff/_ipr_new-specific_

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@
7070
+Same as in Section III above:
7171
@@ -102,1 +105,1 @@
7272
-VIII. Other Note(s):
73-
+VIII. Other Notes:
73+
+VIII. Other Notes:
74+
@@ -104,0 +107,1 @@

test/diff/_ipr_new-third-party_

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@
3737
+NO
3838
@@ -48,1 +50,1 @@
3939
-covered.
40-
+covered:
40+
+covered:
41+
@@ -50,0 +52,1 @@
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
--- https://datatracker.ietf.org/public/ipr_search.cgi?option=rfc_search&rfc_search=1034
22
+++ /ipr/search/?rfc_search=1034&option=rfc_search
3-
@@ -149,1 +149,1 @@
3+
@@ -149,1 +150,1 @@
44
-Search result on RFC1035, "Domain names - implementation and specification", that was updated by RFC3658, "Delegation Signer Resource Record"
55
+Search result on RFC1035, "Domain names - implementation and specification", that was updated by RFC4033, "DNS Security Introduction and Requirements"
6-
@@ -172,2 +172,2 @@
6+
@@ -172,2 +173,2 @@
77
-Search result on RFC2181, "Clarifications to the DNS Specification", that updated RFC1035, "Domain names - implementation and specification"
88
-Search result on RFC2308, "Negative Caching of DNS Queries (DNS NCACHE)", that updated RFC1035, "Domain names - implementation and specification"
99
+Search result on RFC2181, "Clarifications to the DNS Specification", that was updated by RFC4035, "Protocol Modifications for the DNS Security Extensions"
1010
+Search result on RFC2308, "Negative Caching of DNS Queries (DNS NCACHE)", that was updated by RFC4035, "Protocol Modifications for the DNS Security Extensions"
11-
@@ -189,2 +189,2 @@
11+
@@ -189,2 +190,2 @@
1212
-Search result on RFC3008, "Domain Name System Security (DNSSEC) Signing Authority", that was obsoleted by RFC4033, "DNS Security Introduction and Requirements"
1313
-Search result on RFC3090, "DNS Security Extension Clarification on Zone Status", that was obsoleted by RFC4035, "Protocol Modifications for the DNS Security Extensions"
1414
+Search result on RFC3008, "Domain Name System Security (DNSSEC) Signing Authority", that was updated by RFC3658, "Delegation Signer Resource Record"
1515
+Search result on RFC3090, "DNS Security Extension Clarification on Zone Status", that was updated by RFC3658, "Delegation Signer Resource Record"
16-
@@ -202,2 +202,2 @@
16+
@@ -202,2 +203,2 @@
1717
-Search result on RFC3658, "Delegation Signer Resource Record", that updated RFC3090, "DNS Security Extension Clarification on Zone Status"
1818
-Search result on RFC3755, "Legacy Resolver Compatibility for Delegation Signer", that updated RFC3658, "Delegation Signer Resource Record"
1919
+Search result on RFC3658, "Delegation Signer Resource Record", that was updated by RFC3755, "Legacy Resolver Compatibility for Delegation Signer"
2020
+Search result on RFC3755, "Legacy Resolver Compatibility for Delegation Signer", that was updated by RFC3845, "DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format"
21-
@@ -205,1 +205,1 @@
21+
@@ -205,1 +206,1 @@
2222
-Search result on RFC3845, "DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format", that updated RFC3755, "Legacy Resolver Compatibility for Delegation Signer"
2323
+Search result on RFC3845, "DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format", that was obsoleted by RFC4035, "Protocol Modifications for the DNS Security Extensions"
24-
@@ -207,1 +207,1 @@
24+
@@ -207,1 +208,1 @@
2525
-Search result on RFC4034, "Resource Records for the DNS Security Extensions", that obsoleted RFC3008, "Domain Name System Security (DNSSEC) Signing Authority"
2626
+Search result on RFC4034, "Resource Records for the DNS Security Extensions", that updated RFC2136, "Dynamic Updates in the Domain Name System (DNS UPDATE)"

test/diff/generic-diff_A-hat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
@@ -16,1 +16,1 @@
23
-request makes it into the ID tracker.)� A document in this state has
34
+request makes it into the ID tracker.) A document in this state has

test/diff/generic-diff_footer_1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
12
@@ -104,0 +104,1 @@
23
+Made with djangov0.98-dev, Tue, 26 Jun 2007 - webmaster@ietf.org

0 commit comments

Comments
 (0)