mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
GH-1245: require TLD of hostname literals to start with a letter
This commit is contained in:
parent
06191390c3
commit
fb85a19fa8
4 changed files with 16 additions and 1 deletions
2
testing/btest/Baseline/language.invalid-hostnames-2/out
Normal file
2
testing/btest/Baseline/language.invalid-hostnames-2/out
Normal 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"
|
2
testing/btest/Baseline/language.invalid-hostnames/out
Normal file
2
testing/btest/Baseline/language.invalid-hostnames/out
Normal 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"
|
10
testing/btest/language/invalid-hostnames.zeek
Normal file
10
testing/btest/language/invalid-hostnames.zeek
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue