rename strformat.fmt to % as it works better with backslash escape sequences; refs #6958

This commit is contained in:
Araq
2018-01-11 18:05:14 +01:00
parent df73d412ba
commit fb8def869c
3 changed files with 110 additions and 110 deletions

View File

@@ -22,7 +22,7 @@ proc frexp_test(lo, hi, step: float64) =
doAssert(abs(rslt - x) < eps)
when manualTest:
echo fmt("x: {x:10.3f} exp: {exp:4d} frac: {frac:24.20f} check: {$(abs(rslt - x) < eps):-5s} {rslt: 9.3f}")
echo %("x: {x:10.3f} exp: {exp:4d} frac: {frac:24.20f} check: {$(abs(rslt - x) < eps):-5s} {rslt: 9.3f}")
x += step
when manualTest:

View File

@@ -9,5 +9,5 @@ type Obj = object
proc `$`(o: Obj): string = "foobar"
var o: Obj
doAssert fmt"{o}" == "foobar"
doAssert fmt"{o:10}" == "foobar "
doAssert %"{o}" == "foobar"
doAssert %"{o:10}" == "foobar "