Skip to content

Commit f521097

Browse files
authored
squeaky-clean: Add the ability to select which tests to run (#866)
* squeaky-clean: Add the ability to select which tests to run * remove the TODO
1 parent 7e5790b commit f521097

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
(defproject squeaky-clean "0.1.0-SNAPSHOT"
22
:description "squeaky-clean exercise."
33
:url "https://github.com/exercism/clojure/tree/main/exercises/concept/squeaky-clean"
4-
:dependencies [[org.clojure/clojure "1.12.0"]])
4+
:dependencies [[org.clojure/clojure "1.12.0"]]
5+
:test-selectors {:task-1 :task-1
6+
:task-2 :task-2
7+
:task-3 :task-3
8+
:task-4 :task-4
9+
:task-5 :task-5})

exercises/concept/squeaky-clean/src/squeaky_clean.clj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
(:require [clojure.string :as str]))
33

44
(defn clean
5-
"TODO: add docstring"
65
[s]
76
)

exercises/concept/squeaky-clean/test/squeaky_clean_test.clj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,32 @@
22
(:require [clojure.test :refer [deftest is]]
33
squeaky-clean))
44

5-
(deftest ^{:task 1} clean-single-letter
5+
(deftest ^{:task 1 :task-1 true} clean-single-letter
66
(is (= "A" (squeaky-clean/clean "A"))))
77

8-
(deftest ^{:task 1} clean-clean-string
8+
(deftest ^{:task 1 :task-1 true} clean-clean-string
99
(is (= "àḃç" (squeaky-clean/clean "àḃç"))))
1010

11-
(deftest ^{:task 1} clean-string-with-spaces
11+
(deftest ^{:task 1 :task-1 true} clean-string-with-spaces
1212
(is (= "my___Id" (squeaky-clean/clean "my Id"))))
1313

14-
(deftest ^{:task 1} clean-empty-string
14+
(deftest ^{:task 1 :task-1 true} clean-empty-string
1515
(is (= "" (squeaky-clean/clean ""))))
1616

17-
(deftest ^{:task 2} clean-string-with-control-char
17+
(deftest ^{:task 2 :task-2 true} clean-string-with-control-char
1818
(is (= "myCTRLId" (squeaky-clean/clean "my\u0080Id"))))
1919

20-
(deftest ^{:task 3} convert-kebab-to-camel-case
20+
(deftest ^{:task 3 :task-3 true} convert-kebab-to-camel-case
2121
(is (= "àḂç" (squeaky-clean/clean "à-ḃç"))))
2222

23-
(deftest ^{:task 4} clean-string-with-special-characters
23+
(deftest ^{:task 4 :task-4 true} clean-string-with-special-characters
2424
(is (= "MyFinder" (squeaky-clean/clean "My😀😀Finder😀"))))
2525

26-
(deftest ^{:task 4} clean-string-with-numbers
26+
(deftest ^{:task 4 :task-4 true} clean-string-with-numbers
2727
(is (= "MyFinder" (squeaky-clean/clean "1My2Finder3"))))
2828

29-
(deftest ^{:task 5} omit-lower-case-greek-letters
29+
(deftest ^{:task 5 :task-5 true} omit-lower-case-greek-letters
3030
(is (= "MyΟFinder" (squeaky-clean/clean "MyΟβιεγτFinder"))))
3131

32-
(deftest ^{:task 5} combine-conversions
32+
(deftest ^{:task 5 :task-5 true} combine-conversions
3333
(is (= "_AbcĐCTRL" (squeaky-clean/clean "9 -abcĐ😀ω\0"))))

0 commit comments

Comments
 (0)