GH-1245: require TLD of hostname literals to start with a letter

This commit is contained in:
Jon Siwek 2020-10-23 14:17:10 -07:00
parent 06191390c3
commit fb85a19fa8
4 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,2 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error in <...>/invalid-hostnames.zeek, line 4: syntax error, at or near "f"

View file

@ -0,0 +1,2 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error in <...>/invalid-hostnames.zeek, line 4: unknown identifier print0, at or near "print0"

View file

@ -0,0 +1,10 @@
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
print0.0000000000005;
# @TEST-START-NEXT
# This is not a floating-point literal (like you'd see in C/C++) and it's
# also not a valid hostname since the TLD does not start with a letter.
print 0.05f;