From 4793dc0defc369c65671cc2b9f00ac4152015f4c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 3 Dec 2007 22:09:12 +0000 Subject: Just added the MiniMacro test, it could actually be a unit test without a lot of effort. --- src/tests/mmparse.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/tests/mmparse.cpp (limited to 'src/tests') diff --git a/src/tests/mmparse.cpp b/src/tests/mmparse.cpp new file mode 100644 index 0000000..af0c19c --- /dev/null +++ b/src/tests/mmparse.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2007 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ + +#include "bu/minimacro.h" +#include "bu/fstring.h" + +int main( int argc, char *argv[] ) +{ + Bu::MiniMacro mm; + + mm.addVar("name", "Mike"); + mm.addVar("age", "no"); + + printf("%s\n", mm.parse("Hey there {=name:toupper():tolower()}, how are you?").getStr() ); + + return 0; +} + -- cgit v1.2.3