Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore stub file #727

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
20 changes: 12 additions & 8 deletions test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@
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