Added Sieve extension rfc6134 partial

This commit is contained in:
the-djmaze 2022-03-16 14:21:23 +01:00
parent 63de537f8f
commit e4bd24b4e8
13 changed files with 76 additions and 31 deletions

View file

@ -25,7 +25,7 @@ export class BodyTest extends GrammarTest
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.match_type
+ ' ' + this.body_transform
+ ' ' + this.key_list.toString();
+ ' ' + this.key_list;
}
pushArguments(args)

View file

@ -25,7 +25,7 @@ export class EnvironmentTest extends GrammarTest
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.match_type
+ ' ' + this.name
+ ' ' + this.key_list.toString();
+ ' ' + this.key_list;
}
pushArguments(args)

View file

@ -59,8 +59,8 @@ export class StringTest extends GrammarTest
return 'string'
+ ' ' + this.match_type
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.source.toString()
+ ' ' + this.key_list.toString();
+ ' ' + this.source
+ ' ' + this.key_list;
}
pushArguments(args)

View file

@ -46,7 +46,7 @@ export class VacationCommand extends GrammarCommand
// result += ' :from ' + this.arguments[':from'];
}
if (this.addresses.length) {
result += ' :addresses ' + this.addresses.toString();
result += ' :addresses ' + this.addresses;
}
if (this.mime) {
result += ' :mime';

View file

@ -23,7 +23,7 @@ class FlagCommand extends GrammarCommand
toString()
{
return this.identifier + ' ' + this._variablename + ' ' + this.list_of_flags.toString() + ';';
return this.identifier + ' ' + this._variablename + ' ' + this.list_of_flags + ';';
}
get variablename()
@ -79,8 +79,8 @@ export class HasFlagTest extends GrammarTest
return 'hasflag'
+ ' ' + this.match_type
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.variable_list.toString()
+ ' ' + this.list_of_flags.toString();
+ ' ' + this.variable_list
+ ' ' + this.list_of_flags;
}
pushArguments(args)

View file

@ -36,7 +36,7 @@ export class DateTest extends GrammarTest
+ ' ' + this.match_type
+ ' ' + this.header_name
+ ' ' + this.date_part
+ ' ' + this.key_list.toString();
+ ' ' + this.key_list;
}
pushArguments(args)
@ -77,7 +77,7 @@ export class CurrentDateTest extends GrammarTest
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.match_type
+ ' ' + this.date_part
+ ' ' + this.key_list.toString();
+ ' ' + this.key_list;
}
pushArguments(args)

View file

@ -56,7 +56,7 @@ export class MetadataTest extends GrammarTest
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.mailbox
+ ' ' + this.annotation_name
+ ' ' + this.key_list.toString();
+ ' ' + this.key_list;
}
pushArguments(args)
@ -115,7 +115,7 @@ export class ServerMetadataTest extends GrammarTest
+ ' ' + this.match_type
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.annotation_name
+ ' ' + this.key_list.toString();
+ ' ' + this.key_list;
}
pushArguments(args)

View file

@ -0,0 +1,32 @@
/**
* https://tools.ietf.org/html/rfc6134
*/
import {
GrammarStringList,
GrammarTest
} from 'Sieve/Grammar';
/**
* https://datatracker.ietf.org/doc/html/rfc6134#section-2.7
*/
export class ValidExtListTest extends GrammarTest
{
constructor()
{
super();
this.ext_list_names = new GrammarStringList;
}
get require() { return 'foreverypart'; }
toString()
{
return 'valid_ext_list ' + this.ext_list_names;
}
pushArguments(args)
{
this.ext_list_names = args.pop();
}
}