Compare commits

..

No commits in common. '863345c28c0476e413f11d04e1ce6545bc4a2975' and '90018100ec14a189c1285f2d7220a7f47f08b464' have entirely different histories.

  1. 22
      src/rustint/core.clj
  2. 46
      test/rustint/core_test.clj

@ -2543,17 +2543,6 @@
(map last (re-seq #"\{:?(.\d+)?\}" s))
)
(defn replace-groups [string groups]
(if (empty? groups)
string
(
replace-groups
(clojure.string/replace-first string #"\{:?(.\d+)?\}" (first groups))
(rest groups)
)
)
)
(defn convertir-formato-impresion [args]
(let [clojure-fspecifiers (
map
@ -2563,7 +2552,16 @@
)
] (if (empty? clojure-fspecifiers)
args
(cons (replace-groups (first args) clojure-fspecifiers) (rest args))
(into
(rest args)
(list (clojure.string/join
(interleave
(clojure.string/split (first args) #"\{:?(\.\d+)?\}")
(concat clojure-fspecifiers '(""))
)
))
)
)
)
)

@ -389,52 +389,6 @@
)
)
(deftest convertir-formato-impresion-11
(testing "Test 11 convertir-formato-impresion"
(is (=
(convertir-formato-impresion '("Hola mundo! {}" ""))
'("Hola mundo! %s" "")
))
)
)
(deftest convertir-formato-impresion-12
(testing "Test 12 convertir-formato-impresion"
(is (=
(convertir-formato-impresion '("{}" ""))
'("%s" "")
))
)
)
(deftest convertir-formato-impresion-13
(testing "Test 13 convertir-formato-impresion"
(is (=
(convertir-formato-impresion '("{}{}" "1" ""))
'("%s%s" "1" "")
))
)
)
(deftest convertir-formato-impresion-14
(testing "Test 14 convertir-formato-impresion"
(is (=
(convertir-formato-impresion '("{}{}" 1 ""))
'("%d%s" 1 "")
))
)
)
(deftest convertir-formato-impresion-15
(testing "Test 15 convertir-formato-impresion"
(is (=
(convertir-formato-impresion '("{}\t{}" 1 1))
'("%d\t%d" 1 1)
))
)
)
(deftest get-rust-formatters-01
(testing "Test 01 get-rust-formatters"
(is (=

Loading…
Cancel
Save