mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
21 lines
640 B
Text
21 lines
640 B
Text
# This test verifies Zeek's file path normalization.
|
|
#
|
|
# Absolute paths are preserved but normalized:
|
|
# @TEST-EXEC: zeek -b $PWD/././test.zeek 2>&1 | sed "s|$PWD|/...|" >output
|
|
#
|
|
# Unanchored files become localized ("./test.zeek"):
|
|
# @TEST-EXEC: zeek -b test.zeek 2>>output
|
|
#
|
|
# Redundant path constructs get stripped:
|
|
# @TEST-EXEC: zeek -b .//test.zeek 2>>output
|
|
# @TEST-EXEC: zeek -b ././test.zeek 2>>output
|
|
#
|
|
# More complex constructs get normalized too:
|
|
# @TEST-EXEC: mkdir foo
|
|
# @TEST-EXEC: zeek -b ./foo/../././test.zeek 2>>output
|
|
#
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
# @TEST-START-FILE test.zeek
|
|
event idontexist() { }
|
|
# @TEST-END-FILE
|