aboutsummaryrefslogtreecommitdiff
path: root/src/tests/print.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-09-05 20:44:55 +0000
committerMike Buland <eichlan@xagasoft.com>2012-09-05 20:44:55 +0000
commite5f2e1ce7faeb8fb4609f7291e77d5b682685057 (patch)
treec00b5d47966aef916f8a2f055aedadade5fa95d3 /src/tests/print.cpp
parent69d1606ac97547896a0ede8dee5e59fc4a5de7c2 (diff)
downloadlibbu++-e5f2e1ce7faeb8fb4609f7291e77d5b682685057.tar.gz
libbu++-e5f2e1ce7faeb8fb4609f7291e77d5b682685057.tar.bz2
libbu++-e5f2e1ce7faeb8fb4609f7291e77d5b682685057.tar.xz
libbu++-e5f2e1ce7faeb8fb4609f7291e77d5b682685057.zip
This'll make *everything* rebuild. String formatters now support the end()
call, which will force substitution and return a string. They now also support ending actions, which let us do great stuff like printing stuff out after formatting finished...and other stuff.
Diffstat (limited to 'src/tests/print.cpp')
-rw-r--r--src/tests/print.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/print.cpp b/src/tests/print.cpp
new file mode 100644
index 0000000..7d55554
--- /dev/null
+++ b/src/tests/print.cpp
@@ -0,0 +1,13 @@
1#include <bu/sio.h>
2
3int main()
4{
5 Bu::print("hello there %1!\n").arg("Bob");
6
7 Bu::println("This is %1 crazy, like %2 times over!").
8 arg("totally").arg( 47.2 );
9 Bu::println("This is unsubstituted?");
10
11 return 0;
12}
13