zeek/testing/btest/Baseline/scripts.base.utils.paths/output
Robin Sommer 789cb376fd GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
This also installs symlinks from "zeek" and "bro-config" to a wrapper
script that prints a deprecation warning.

The btests pass, but this is still WIP. broctl renaming is still
missing.

#239
2019-05-01 21:43:45 +00:00

84 lines
1.9 KiB
Text

test compress_path()
===============================
Given : foo//bar
Expect: foo/bar
Result: foo/bar
Result: SUCCESS
===============================
Given : foo//bar/..
Expect: foo
Result: foo
Result: SUCCESS
===============================
Given : foo/bar/../..
Expect:
Result:
Result: SUCCESS
===============================
Given : foo//bar/../..
Expect:
Result:
Result: SUCCESS
===============================
Given : /foo/../bar
Expect: /bar
Result: /bar
Result: SUCCESS
===============================
Given : /foo/../bar/..
Expect: /
Result: /
Result: SUCCESS
===============================
Given : /foo/baz/../..
Expect: /
Result: /
Result: SUCCESS
===============================
Given : ../..
Expect: ../..
Result: ../..
Result: SUCCESS
===============================
Given : foo/../../..
Expect: ../..
Result: ../..
Result: SUCCESS
===============================
test extract_path()
===============================
Given : "/this/is/a/dir" is current directory
Expect: /this/is/a/dir
Result: /this/is/a/dir
Result: SUCCESS
===============================
Given : /this/is/a/dir is current directory
Expect: /this/is/a/dir
Result: /this/is/a/dir
Result: SUCCESS
===============================
Given : /this/is/a/dir\ is\ current\ directory
Expect: /this/is/a/dir\ is\ current\ directory
Result: /this/is/a/dir\ is\ current\ directory
Result: SUCCESS
===============================
Given : hey, /foo/bar/baz.zeek is a cool script
Expect: /foo/bar/baz.zeek
Result: /foo/bar/baz.zeek
Result: SUCCESS
===============================
Given : here's two dirs: /foo/bar and /foo/baz
Expect: /foo/bar
Result: /foo/bar
Result: SUCCESS
===============================
test build_path_compressed()
===============================
/home/bro/policy/somefile.zeek
/usr/local/bro/share/bro/somefile.zeek
/usr/local/bro/somefile.zeek
===============================
test build_full_path()
===============================
/home/bro//policy/somefile.zeek
/usr/local/bro/share/bro/somefile.zeek