aboutsummaryrefslogtreecommitdiff
path: root/src/unit/string.unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-09-05 19:29:29 +0000
committerMike Buland <eichlan@xagasoft.com>2012-09-05 19:29:29 +0000
commit69d1606ac97547896a0ede8dee5e59fc4a5de7c2 (patch)
tree0bbbd7d92387c2c810e33cf594e9406485da6915 /src/unit/string.unit
parent67a4bba2ce4be36a23d75d9ae060579d554f6a17 (diff)
downloadlibbu++-69d1606ac97547896a0ede8dee5e59fc4a5de7c2.tar.gz
libbu++-69d1606ac97547896a0ede8dee5e59fc4a5de7c2.tar.bz2
libbu++-69d1606ac97547896a0ede8dee5e59fc4a5de7c2.tar.xz
libbu++-69d1606ac97547896a0ede8dee5e59fc4a5de7c2.zip
Fixed silly bug involving juxtaposed replacement tokens in
Bu::String::FormatProxy substitutions.
Diffstat (limited to '')
-rw-r--r--src/unit/string.unit8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unit/string.unit b/src/unit/string.unit
index acef0d5..dfa0c38 100644
--- a/src/unit/string.unit
+++ b/src/unit/string.unit
@@ -573,6 +573,14 @@ suite String
573 unitTest( Bu::String(" \tHello \t\t\r\nthere\r\n \t").trimWhitespace() 573 unitTest( Bu::String(" \tHello \t\t\r\nthere\r\n \t").trimWhitespace()
574 == "Hello \t\t\r\nthere" ); 574 == "Hello \t\t\r\nthere" );
575 } 575 }
576
577 test format1
578 {
579 unitTest( (Bu::String)Bu::String("%1").arg( 12, Bu::Fmt().width(3) ) == " 12" );
580 unitTest( (Bu::String)Bu::String("%1 %2").arg("IQ").arg(4, Bu::Fmt().plus()) == "IQ +4" );
581 unitTest( (Bu::String)Bu::String("%1%2").arg("IQ").arg(4, Bu::Fmt().plus()) == "IQ+4" );
582 unitTest( (Bu::String)Bu::String("Sup #%1-Guy!").arg( 1 ) == "Sup #1-Guy!" );
583 }
576} 584}
577// 03F09CA4F58AC8CA0E80F0D9D409D0A60700A192270004BC3A99E91D0001034F544603362E35013103313130019CA4F58AC8CA0E0002830800002C4200008AC200EBF7D9D4090127BB010000E3 585// 03F09CA4F58AC8CA0E80F0D9D409D0A60700A192270004BC3A99E91D0001034F544603362E35013103313130019CA4F58AC8CA0E0002830800002C4200008AC200EBF7D9D4090127BB010000E3
578// 586//