Skip to content

Commit a233d04

Browse files
authored
Conditional row removal (#5)
* Fix link in readme.md * Conditional remove row * Fix requirement * IfCommand requirements * Adding test for requirement definitions * Remove unused var * Remove stub test template
1 parent 9e10352 commit a233d04

28 files changed

+89
-30
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ It provides a user-friendly editor for creating complex email filtering rules wi
1414
- 📚 Palette of commands, including core Sieve and provider-specific extensions
1515
- 🖱️ Drag & drop support for reordering and nesting commands
1616
- 🔄 Rendering of the visual script into valid Sieve source code
17-
- 🛠️ Extensible architecture – easily add new commands (see [How To Add New Command](Source/Sieve%20Commands/HowToAddNewCommand.md))
17+
- 🛠️ Extensible architecture – easily add new commands (see [How To Add New Command](Source/Yasba/Sieve%20Commands/HowToAddNewCommand.md))
1818

1919
## Architecture Overview
2020

@@ -40,7 +40,7 @@ Yasba is designed with extensibility in mind. The main architectural components
4040

4141
Contributions are welcome!
4242

43-
Check out [How To Add New Command](HowToAddNewCommand.md) to learn how to extend Yasba with new Sieve commands.
43+
Check out [How To Add New Command](Source/Yasba/Sieve%20Commands/HowToAddNewCommand.md) to learn how to extend Yasba with new Sieve commands.
4444

4545
## License
4646

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Testing
2+
@testable import Yasba
3+
4+
struct AddFlagCommandTests {
5+
@Test func requirements() throws {
6+
let command = AddFlagCommand(tag: "tag")
7+
8+
#expect(command.requirements == ["imap4flags"])
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Testing
2+
@testable import Yasba
3+
4+
struct FileIntoCommandTests {
5+
@Test func requirements() throws {
6+
let command = FileIntoCommand(mailbox: "inbox")
7+
8+
#expect(command.requirements == ["fileinto"])
9+
}
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Testing
2+
@testable import Yasba
3+
4+
struct IfCommandTests {
5+
@Test func childernRequirementsArePassed() throws {
6+
let command = IfCommand(
7+
quantifier: .any,
8+
tests: [ ],
9+
thenChildren: [ DummyLeaf("do1") ],
10+
elseChildren: [ DummyLeaf("do2") ]
11+
)
12+
13+
#expect(command.requirements == [DummyLeaf.requirement, DummyLeaf.requirement])
14+
}
15+
}
16+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Testing
2+
@testable import Yasba
3+
4+
struct ProtonExpireCommandTests {
5+
@Test func requirements() throws {
6+
let command = ProtonExpireCommand(days: 1)
7+
8+
#expect(command.requirements == ["vnd.proton.expire"])
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Testing
2+
@testable import Yasba
3+
4+
struct ProtonMarkAsReadCommandTests {
5+
@Test func requirements() throws {
6+
let command = ProtonMarkAsReadCommand()
7+
8+
#expect(command.requirements == ["imap4flags"])
9+
}
10+
}

0 commit comments

Comments
 (0)