diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-12-03 22:09:12 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-12-03 22:09:12 +0000 |
commit | 4793dc0defc369c65671cc2b9f00ac4152015f4c (patch) | |
tree | 09a923bd4b92dc1647ff31508326c797b9be4dc4 | |
parent | 96ca22c7a1f9c5990e136a6ccddc8a33319b9043 (diff) | |
download | libbu++-4793dc0defc369c65671cc2b9f00ac4152015f4c.tar.gz libbu++-4793dc0defc369c65671cc2b9f00ac4152015f4c.tar.bz2 libbu++-4793dc0defc369c65671cc2b9f00ac4152015f4c.tar.xz libbu++-4793dc0defc369c65671cc2b9f00ac4152015f4c.zip |
Just added the MiniMacro test, it could actually be a unit test without a lot of
effort.
-rw-r--r-- | src/tests/mmparse.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | #include "bu/minimacro.h" | ||
9 | #include "bu/fstring.h" | ||
10 | |||
11 | int main( int argc, char *argv[] ) | ||
12 | { | ||
13 | Bu::MiniMacro mm; | ||
14 | |||
15 | mm.addVar("name", "Mike"); | ||
16 | mm.addVar("age", "no"); | ||
17 | |||
18 | printf("%s\n", mm.parse("Hey there {=name:toupper():tolower()}, how are you?").getStr() ); | ||
19 | |||
20 | return 0; | ||
21 | } | ||
22 | |||