File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 (file_repository/save new-plan-string file-path )
5858 errors/no-error )))))))
5959
60- (defn- run-with-arguments [arguments ]
60+ (defn run-with-arguments [arguments ]
6161 (def file-path (arguments :default ))
6262 (if file-path
6363 (run-with-file-path arguments file-path )
Original file line number Diff line number Diff line change 2222 [errors exit-status ] (alas/run-with-file-path arguments " ./test/examples/unparsable-todo.md" )]
2323 (test (empty? errors ) false )
2424 (test exit-status 4 )))
25+
26+ # # —————————————————————————————————————————————————————————————————————————————————————————————————
27+ # # Test run-with-arguments
28+
29+ (deftest " returns exit status 0 when there were no errors"
30+ (let [arguments {" skip-backup" true " stats" true :default " ./test/examples/todo.md" }
31+ [errors exit-status ] (alas/run-with-arguments arguments )]
32+ (test (empty? errors ) true )
33+ (test exit-status 0 )))
34+
35+ (deftest " returns exit status 2 when when the file path is missing"
36+ (let [arguments {" skip-backup" true " stats" true }
37+ [errors exit-status ] (alas/run-with-arguments arguments )]
38+ (test (empty? errors ) false )
39+ (test exit-status 2 )))
You can’t perform that action at this time.
0 commit comments