This repository was archived by the owner on Jul 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
ShortcutsSwift.playgroundbook/Contents/Sources Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,14 @@ public enum Aggrandizement {
107
107
case fileSize
108
108
case fileExtension
109
109
case number( Number )
110
+ case string( String )
110
111
111
112
var propertyListValue : Any {
112
113
switch self {
113
114
case . fileSize: return " WFFileSizeProperty "
114
115
case . fileExtension: return " WFFileExtensionProperty "
115
116
case . number( let number) : return number
117
+ case . string( let string) : return string
116
118
}
117
119
}
118
120
}
Original file line number Diff line number Diff line change @@ -46,6 +46,15 @@ class AggrandizementTests: XCTestCase {
46
46
)
47
47
}
48
48
49
+ func testCustomStringProperty( ) {
50
+ let result = actionOutput ( )
51
+ let title = result. with ( propertyName: . custom( " Title " ) , userInfo: . string( " title " ) )
52
+ _ = buildShortcut (
53
+ getBatteryLevel ( ) . savingOutput ( to: result)
54
+ + showResult( " Test Aggrandizements \( title) " )
55
+ )
56
+ }
57
+
49
58
func testCoercion( ) {
50
59
let result = actionOutput ( )
51
60
let coercion = result. with ( type: . article)
You can’t perform that action at this time.
0 commit comments