Skip to content

Commit

Permalink
Restore example file
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Jan 9, 2025
1 parent ca77a6d commit c54477b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ pom.xml.asc
**/*/*.ipynb_checkpoints
concepts/functions-generating-functions/introduction_files/
concepts/functions-generating-functions/*.html
exercises/**/*.bak
21 changes: 13 additions & 8 deletions test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@
example (if practice?
(str dir ".meta/example.clj")
(str dir ".meta/exemplar.clj"))
src (str dir "src/" (->snake_case slug) ".clj")]
(shell/sh "cp" example src)
(= "pass" ((json/parse-string
(:out (shell/sh (str test-runner-dir "test-runner.clj")
slug
dir
dir)))
"status"))))
src (str dir "src/" (->snake_case slug) ".clj")
src-copy (str src ".bak")]
(shell/sh "cp" src src-copy)
(try
((shell/sh "cp" example src)
(= "pass" ((json/parse-string
(:out (shell/sh (str test-runner-dir "test-runner.clj")
slug
dir
dir)))
"status")))
(finally (shell/sh "mv" src-copy src)))))


(defn test-exercises! []
(let [exercises (or (seq (take 1 *command-line-args*))
Expand Down

0 comments on commit c54477b

Please sign in to comment.