#.require. jvm # some simple string subst formatting tests - java format descriptions namespace Test class Test def main is shared # formatting #mol as float = 42.0 #print '[mol:%.2d]' ## TODO This not yet working as formatting on makeString in java version NYI #assert '[mol:%.2d]'=='42.00' a = 99 # test some using format substitution without the escape syntax. t = String.format('a = %0$s[a]]', c'[') assert t == r'a = [99]' s10 = 'FMT:a = '+ ns'[' +'[a]]' assert s10 == r'FMT:a = [99]' a1 = String.format('%0$s[a]]', ns'[') s11 = 'a = [a1]' assert s11 == r'a = [99]'