Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cloojure committed Mar 3, 2023
1 parent 185f8d8 commit ed64521
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 8 deletions.
9 changes: 3 additions & 6 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
))

(def lib-name 'tupelo/tupelo) ; must be a qualified symbol
(def version "23.03.03b-SHAPSHOT")
(def version "23.03.03c-SHAPSHOT")
(def tag (str "v" version))

(def build-folder "target")
Expand All @@ -30,13 +30,10 @@
:version version
:basis basis
:src-dirs ["src"]
:scm {

:url "https://github.com/cloojure/tupelo"
:scm {:url "https://github.com/cloojure/tupelo"
:connection "scm:git:git://github.com/cloojure/tupelo.git"
:developerConnection "scm:git:ssh://[email protected]/cloojure/tupelo.git"
}
})
:tag tag}})

(b/jar {:class-dir jar-content ; create jar
:jar-file jar-file-name})
Expand Down
3 changes: 2 additions & 1 deletion src/cljc/tupelo/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -2895,7 +2895,8 @@
idxs []]
(if-not (<= i N-1)
idxs
(let [[data1 data2] (split-at i data)
(let [data1 (subvec data 0 i)
data2 (subvec data i N)
split? (pred data1 data2)
result-next (if split?
(append idxs i)
Expand Down
47 changes: 47 additions & 0 deletions test-refresh.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{; Specifies a command to run on test failure/success. Short message is passed as the
; last argument to the command. Defaults to no command.
;; :notify-command ["terminal-notifier" "-title" "Tests" "-message"]

; Set to true to send notifications to growl. Defaults to false.
;; :growl false

; only growl and use the notify command if there are failures. Defaults to true.
;; :notify-on-success false

; Stop clojure.test from printing "Testing namespace.being.tested".
; Very useful on codebases with many test namespaces. Defaults to false.
:quiet true

; If this is specified then only tests in namespaces that were just reloaded by tools.namespace
; (namespaces where a change was detected in it or a dependent namespace) are run. This can also be
; passed as a command line option: lein test-refresh :changes-only.
:changes-only true

; If specified, binds value to clojure.test/*stack-trace-depth*
:stack-trace-depth nil

; specifiy a custom clojure.test report method
; Specify the namespace and multimethod that will handle reporting
; from test-refresh. The namespace must be available to the project dependencies.
; Defaults to no custom reporter
;; :report myreport.namespace/my-report

; If set to a truthy value, then lein test-refresh will only run your tests once. Also supported as a
; command line option. Reasoning for feature can be found in PR:
; https://github.com/jakemcc/lein-test-refresh/pull/48
:run-once true

; If given, watch for changes only in the given folders. By default, watches for changes on entire classpath.
:watch-dirs ["src" "test"]

; If given, only refresh code in the given directories. By default every directory on the
; classpath is refreshed. Value is passed through to clojure.tools.namespace.repl/set-refresh-dirs
; https://github.com/clojure/tools.namespace/blob/f3f5b29689c2bda53b4977cf97f5588f82c9bd00/src/main/clojure/clojure/tools/namespace/repl.clj#L164
:refresh-dirs ["src" "test"]


; Use this flag to specify your own flag to add to cause test-refresh to focus. Intended to be used
; to let you specify a shorter flag than the default :test-refresh/focus.
:focus-flag :test-refresh/focus

}
4 changes: 3 additions & 1 deletion test/cljc/tst/tupelo/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,9 @@
[[1 2] [3] [6 7 8] [9] [12 13] [15 16 17] [18] [18] [18] [3 4 5]]))
(throws? (t/partition-using even? 5)))

(dotest ; #todo fix so use `verify` for both clj and cljs

; #todo fix so use `verify` for both clj and cljs
(dotest-focus

; We use `split-at` to partition the coll. Given a coll like [0 1 2], it makes
; no sense to give degenerate splits like {:data1 [] :data2 [0 1 2]}
Expand Down

0 comments on commit ed64521

Please sign in to comment.