feat: Adds stack separators, removes some unused nodes from cli-doc module
All checks were successful
CI / Run tests. (push) Successful in 52s

This commit is contained in:
2024-12-08 10:58:03 -05:00
parent c977a1c805
commit c6a269f062
12 changed files with 229 additions and 177 deletions

View File

@@ -33,16 +33,20 @@ struct CliDocCoreTests {
}
#expect(stack.render() == "foo bar")
let tabStack = HStack(separator: .tab()) {
let tabStack = HStack {
"foo"
"bar"
}
.separator(.tab())
#expect(tabStack.render() == "foo\tbar")
let customStack = HStack(separator: .custom(":blob:")) {
let customStack = HStack {
"foo"
"bar"
}
.separator(.custom(":blob:"))
#expect(customStack.render() == "foo:blob:bar")
}
@@ -58,10 +62,12 @@ struct CliDocCoreTests {
bar
""")
let customStack = VStack(separator: .custom("\n\t")) {
let customStack = VStack {
"foo"
"bar"
}
.separator(.custom("\n\t"))
#expect(customStack.render() == """
foo
\tbar