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

Correctly handle $GENERATE modifiers #703

Merged
merged 3 commits into from
Jun 23, 2018
Merged

Conversation

4a6f656c
Copy link
Contributor

Correctly handle $GENERATE modifiers. The width and type (aka base)
components of a modifier are optional. This means that ${2,0,d}, ${2,0} and ${2} are
valid modifiers, however only the first format was previously permitted. Use default
values for the width and/or type if they are unspecified in the modifier.

While here improve test coverage by adding tests for parsing zones with $GENERATE and the modToPrintf used by $GENERATE.

Fixes issue #702

Joel Sing added 3 commits June 20, 2018 01:41
As per http://www.zytrax.com/books/dns/ch8/generate.html, the width and type (aka base)
components of a modifier are optional. This means that ${2,0,d}, ${2,0} and ${2} are
valid modifiers, however only the first format was previously permitted. Use default
values for the width and/or type if they are unspecified in the modifier.
Copy link
Owner

@miekg miekg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

restarted travis build which flaked.

@codecov-io
Copy link

Codecov Report

Merging #703 into master will increase coverage by 0.6%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #703     +/-   ##
=========================================
+ Coverage   58.16%   58.77%   +0.6%     
=========================================
  Files          37       37             
  Lines       10121    10127      +6     
=========================================
+ Hits         5887     5952     +65     
+ Misses       3171     3096     -75     
- Partials     1063     1079     +16
Impacted Files Coverage Δ
generate.go 54.8% <100%> (+54.8%) ⬆️
scan.go 78.1% <0%> (+1.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f90eb8f...410cac3. Read the comment docs.

@miekg miekg merged commit ed07089 into miekg:master Jun 23, 2018
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.

3 participants