feat: add the check_output_matches plugin #5

Merged
Emmanuel BENOîT merged 16 commits from tseeker/gomonop:20240720-line-matches into master 2024-07-20 22:57:10 +02:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 1f9be057b6 - Show all commits

View file

@ -35,6 +35,9 @@ func RangeMinMax(min, max string) *Range {
panic("invalid performance data range minimum value")
}
pdRange := &Range{}
if min == "~" {
min = ""
}
pdRange.start = min
pdRange.end = max
return pdRange

View file

@ -43,6 +43,14 @@ func TestRangeMinMax(t *testing.T) {
assert.False(t, pdr.inside, "Inside flag should not be set")
}
func TestRangeMinMaxOpen(t *testing.T) {
min, max := "~", "456"
pdr := RangeMinMax(min, max)
assert.Equal(t, "", pdr.start, "Min value not clear in PerfDataRange")
assert.Equal(t, max, pdr.end, "Max value not copied to PerfDataRange")
assert.False(t, pdr.inside, "Inside flag should not be set")
}
func TestRangeInside(t *testing.T) {
pdr := &Range{}
pdr = pdr.Inside()