-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TESTING: parse_tests: reformat/regenerate .js .json files
- Loading branch information
1 parent
e232501
commit e9ff430
Showing
102 changed files
with
1,292 additions
and
712 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
|
||
var REG = NewRegistrar("Third-Party","NONE"); | ||
var REG = NewRegistrar("Third-Party", "NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); | ||
|
||
D("foo.com",REG,DnsProvider(CF), | ||
A("@","1.2.3.4") | ||
); | ||
D("foo.com", REG, DnsProvider(CF), | ||
A("@", "1.2.3.4") | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
var REG = NewRegistrar("Third-Party","NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI") | ||
D("foo.com",REG,DnsProvider(CF), | ||
A("@","1.2.3.4",TTL(42)) | ||
); | ||
var REG = NewRegistrar("Third-Party", "NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); | ||
|
||
D("foo.com", REG, DnsProvider(CF), | ||
A("@", "1.2.3.4", TTL(42)), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
var CLOUDFLARE = NewRegistrar("Cloudflare", "CLOUDFLAREAPI"); | ||
|
||
var CLOUDFLARE = NewRegistrar("Cloudflare","CLOUDFLAREAPI"); | ||
D("foo.com",CLOUDFLARE, | ||
A("@","1.2.3.4",{"cloudflare_proxy":"ON"}) | ||
); | ||
D("foo.com", CLOUDFLARE, | ||
A("@", "1.2.3.4", { | ||
"cloudflare_proxy": "ON" | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
var REG = NewRegistrar("Third-Party","NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI") | ||
var REG = NewRegistrar("Third-Party", "NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); | ||
|
||
var BASE = IP("1.2.3.4") | ||
var BASE = IP("1.2.3.4"); | ||
|
||
D("foo.com",REG,DnsProvider(CF,0), | ||
A("@",BASE), | ||
A("p1",BASE+1), | ||
A("p255", BASE+255) | ||
); | ||
D("foo.com", REG, DnsProvider(CF, 0), | ||
A("@", BASE), | ||
A("p1", BASE + 1), | ||
A("p255", BASE + 255), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 22 additions & 21 deletions
43
pkg/js/parse_tests/005-ignored-records.js
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
D("foo.com", "none" | ||
, IGNORE_NAME("testignore") | ||
, IGNORE_NAME("testignore2", "A") | ||
, IGNORE_NAME("testignore3", "A, CNAME, TXT") | ||
, IGNORE_NAME("testignore4", "*") | ||
, IGNORE_TARGET("testtarget", "CNAME") | ||
, IGNORE("legacyignore") | ||
, IGNORE_NAME("@") | ||
, IGNORE_TARGET("@", "CNAME") | ||
D("foo.com", "none", | ||
IGNORE_NAME("testignore"), | ||
IGNORE_NAME("testignore2", "A"), | ||
IGNORE_NAME("testignore3", "A, CNAME, TXT"), | ||
IGNORE_NAME("testignore4", "*"), | ||
IGNORE_TARGET("testtarget", "CNAME"), | ||
IGNORE("legacyignore"), | ||
IGNORE_NAME("@"), | ||
IGNORE_TARGET("@", "CNAME"), | ||
); | ||
D("diff2.com", "none" | ||
, IGNORE("mylabel") | ||
, IGNORE("mylabel2", "") | ||
, IGNORE("mylabel3", "", "") | ||
, IGNORE("", "A") | ||
, IGNORE("", "A,AAAA") | ||
, IGNORE("", "", "mytarget") | ||
, IGNORE("labelc", "CNAME", "targetc") | ||
// Compatibility mode: | ||
, IGNORE_NAME("nametest") | ||
, IGNORE_TARGET("targettest1") | ||
, IGNORE_TARGET("targettest2", "A") | ||
|
||
D("diff2.com", "none", | ||
IGNORE("mylabel"), | ||
IGNORE("mylabel2", ""), | ||
IGNORE("mylabel3", "", ""), | ||
IGNORE("", "A"), | ||
IGNORE("", "A,AAAA"), | ||
IGNORE("", "", "mytarget"), | ||
IGNORE("labelc", "CNAME", "targetc"), | ||
// Compatibility mode: | ||
IGNORE_NAME("nametest"), | ||
IGNORE_TARGET("targettest1"), | ||
IGNORE_TARGET("targettest2", "A"), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
var REG = NewRegistrar("Third-Party","NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI") | ||
var REG = NewRegistrar("Third-Party", "NONE"); | ||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); | ||
|
||
var TRANSFORM_INT = [ | ||
{low: "0.0.0.0", high: "1.1.1.1", newBase: "2.2.2.2" }, | ||
{low: "1.1.1.1", high: IP("2.2.2.2"), newBase: ["3.3.3.3","4.4.4.4",IP("5.5.5.5")]} , | ||
{low: "1.1.1.1", high: IP("2.2.2.2"), newIP: ["3.3.3.3","4.4.4.4",IP("5.5.5.5")]} | ||
] | ||
// This is a cloudflare-specific transform. It is no longer used because | ||
// IMPORT_TRANSFORM works for all providers. | ||
|
||
D("foo.com",REG,DnsProvider(CF), | ||
A("@","1.2.3.4",{transform: TRANSFORM_INT}) | ||
); | ||
var TRANSFORM_INT = [{ | ||
low: "0.0.0.0", | ||
high: "1.1.1.0", | ||
newBase: "2.2.2.2" | ||
}, { | ||
low: "1.1.1.1", | ||
high: IP("2.2.2.2"), | ||
newIP: ["3.3.3.3", "4.4.4.4", IP("5.5.5.5")] | ||
}]; | ||
|
||
D("foo.com", REG, DnsProvider(CF), | ||
A("@", "1.2.3.4", { | ||
transform: TRANSFORM_INT | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
$TTL 300 | ||
@ IN A 3.4.5.6 | ||
IN A 4.5.6.7 | ||
IN A 5.6.7.8 | ||
@ IN A 3.3.3.3 | ||
IN A 4.4.4.4 | ||
IN A 5.5.5.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
var TRANSFORM_NEWIP = [{ | ||
low: "0.0.0.0", | ||
high: "1.1.1.1", | ||
newIP: "2.2.2.2" | ||
}]; | ||
D("foo1.com", "reg", | ||
A("bar", "1.1.1.1"), | ||
A("foo", "5.5.5.5"), | ||
); | ||
|
||
var TRANSFORM_BASE = [{ | ||
low: "0.0.0.0", | ||
high: "1.1.1.1", | ||
newBase: "4.4.4.4" | ||
low: "1.1.1.0", | ||
high: "1.1.1.100", | ||
newBase: "4.4.4.100" | ||
}, { | ||
low: "7.7.7.7", | ||
high: "8.8.8.8", | ||
newBase: "9.9.9.9" | ||
}, | ||
]; | ||
low: "5.5.5.2", | ||
high: "5.5.5.100", | ||
newBase: "6.6.6.0" | ||
}, ]; | ||
|
||
D("foo1.com", "reg"); | ||
|
||
D("foo2.com", "reg", | ||
IMPORT_TRANSFORM(TRANSFORM_BASE, "foo1.com", 60) | ||
D("inny", "reg", | ||
IMPORT_TRANSFORM(TRANSFORM_BASE, "foo1.com", 60), | ||
); | ||
|
||
D("foo3.com", "reg", | ||
IMPORT_TRANSFORM_STRIP(TRANSFORM_NEWIP, "foo1.com", 99, ".com") | ||
var TRANSFORM_NEWIP = [{ | ||
low: "5.5.5.0", | ||
high: "6.0.0.0", | ||
newIP: "7.7.7.7" | ||
}]; | ||
|
||
D("com.inny", "reg", | ||
IMPORT_TRANSFORM_STRIP(TRANSFORM_NEWIP, "foo1.com", 99, "com"), | ||
); |
Oops, something went wrong.