mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add testcases for plugin with doctest usage
This commit is contained in:
parent
5c44dfbb9e
commit
78803b04fc
11 changed files with 113 additions and 0 deletions
17
testing/scripts/diff-clean-doctest
Executable file
17
testing/scripts/diff-clean-doctest
Executable file
|
@ -0,0 +1,17 @@
|
|||
#! /usr/bin/env bash
|
||||
#
|
||||
# doctest's console reports contain several aspects that change over time:
|
||||
# - The total number of tests, which we replace with "XX"
|
||||
# - The version number, which becomes "x.y.z"
|
||||
# - Spacing in the report, which we normalize to single spaces
|
||||
|
||||
# Get us "modern" regexps with sed.
|
||||
if [ $(uname) == "Linux" ]; then
|
||||
sed="sed -r"
|
||||
else
|
||||
sed="sed -E"
|
||||
fi
|
||||
|
||||
$sed -e 's/[0-9]+ skipped/XX skipped/g' |
|
||||
$sed -e 's/"[0-9]+\.[0-9]+\.[0-9]+"/"x.y.z"/g' |
|
||||
$sed -e 's/ {2,}/ /g'
|
Loading…
Add table
Add a link
Reference in a new issue