Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use match_array for better failure output #173

Merged
merged 1 commit into from
Nov 30, 2017

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Nov 30, 2017

eq() is very useless on array comparison when you want to debug:

expected: ["ddns-updates on;", "ddns-update-style standard;", "update-static-leases on;", "update-optimization ...1.1.1.in-addr.arpa. {", "  primary 1.1.1.1;", "  primary6 1:5ee:bad::c0de;", "  key rndc.key;", "}"]
     got: ["ddns-updates on;", "ddns-update-style standard;", "update-static-leases on;", "update-optimization ...1.1.1.in-addr.arpa. {", "  primary 1.1.1.1;", "  primary6 1:5ee:bad::c0de;", "  key rndc.key;", "}"]

match_array will show which elements are missing and extra.

eq() is very useless on array comparison when you want to debug:

expected: ["ddns-updates on;", "ddns-update-style standard;", "update-static-leases on;", "update-optimization ...1.1.1.in-addr.arpa. {", "  primary 1.1.1.1;", "  primary6 1:5ee:bad::c0de;", "  key rndc.key;", "}"]
     got: ["ddns-updates on;", "ddns-update-style standard;", "update-static-leases on;", "update-optimization ...1.1.1.in-addr.arpa. {", "  primary 1.1.1.1;", "  primary6 1:5ee:bad::c0de;", "  key rndc.key;", "}"]

match_array will show which elements are missing and extra.
@alexjfisher alexjfisher merged commit cc7e98b into voxpupuli:master Nov 30, 2017
@ekohl ekohl deleted the use-match-array branch December 1, 2017 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants