File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 288288 (s/with-gen
289289 (s/and string?
290290 (partial re-matches xAPIVersionRegEx))
291- #(sgen/fmap (fn [i]
292- (#?(:clj format
293- :cljs gstring/format) " 1.0.%d" i))
294- (sgen/int ))))
291+ #(sgen/return " 2.0.0" )))
295292
296293(s/def ::sha2
297294 (s/with-gen
Original file line number Diff line number Diff line change 148148(def xAPIVersionRegEx
149149 (let [suf-part " [0-9a-zA-Z-]+(?:\\ .[0-9a-zA-Z-]+)*"
150150 suffix (str " (\\ .[0-9]+(?:-" suf-part " )?(?:\\ +" suf-part " )?)?" )
151- ver-str (str " ^[1-2] \\ .0" suffix " $" )]
151+ ver-str (str " ^(1 \\ .0" suffix " )|(2 \\ .0 \\ .0) $" )]
152152 (re-pattern ver-str)))
153153
154154(def Base64RegEx
Original file line number Diff line number Diff line change 151151 (re-matches xAPIVersionRegEx " 1.0" )
152152 (re-matches xAPIVersionRegEx " 1.0.32-abc.def+ghi.jkl" )))
153153 (is (not (re-matches xAPIVersionRegEx " 0.9.5" ))))
154- (testing " matches xAPI 2.0.x versions "
154+ (testing " matches xAPI 2.0.0 version only "
155155 (is (and (re-matches xAPIVersionRegEx " 2.0.0" )
156- (re-matches xAPIVersionRegEx " 2.0.2" )
157- (re-matches xAPIVersionRegEx " 2.0" )
158- (re-matches xAPIVersionRegEx " 2.0.32-abc.def+ghi.jkl" )))))
156+ (not (re-matches xAPIVersionRegEx " 2.0.2" ))))))
159157
160158(deftest duration-regex-test
161159 (testing " matches ISO durations"
You can’t perform that action at this time.
0 commit comments