Added: rfc5233

Activate: comparator
Bugfix: StringList must use .toString()
Bugfix: redirect command
Bugfix: MultiLine
This commit is contained in:
djmaze 2021-01-15 16:09:03 +01:00
parent 3566f4a538
commit 73e26d388a
12 changed files with 86 additions and 50 deletions

View file

@ -16,14 +16,13 @@ class SpamTest extends Grammar.Test
}
// get require() { return this.percent ? 'spamtestplus' : 'spamtest'; }
// get require() { return /:value|:count/.test(this.match_type) ? 'relational' : ''; }
get require() { return 'spamtestplus'; }
get require() { return /:value|:count/.test(this.match_type) ? ['spamtestplus','relational'] : 'spamtestplus'; }
toString()
{
return 'spamtest'
+ (this.percent ? ' :percent' : '')
// + ' ' + this.comparator
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.match_type
+ ' ' + this.value;
}
@ -48,13 +47,12 @@ class VirusTest extends Grammar.Test
this.value = new Grammar.QuotedString; // 1 - 5
}
// get require() { return /:value|:count/.test(this.match_type) ? ['virustest','relational'] : 'virustest'; }
get require() { return 'virustest'; }
get require() { return /:value|:count/.test(this.match_type) ? ['virustest','relational'] : 'virustest'; }
toString()
{
return 'virustest'
// + ' ' + this.comparator
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.match_type
+ ' ' + this.value;
}