diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-11-09 22:11:03 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-11-09 22:11:03 +0000 |
commit | bb9c0dc8dd2c852d9b6e89b9fd883232019cea93 (patch) | |
tree | 8ce5fce962ce91a96a60a80a2214ca4d4d808f4c /src/tests/taf.cpp | |
parent | 414328563a8c3972e8d053fb770741eb0123d826 (diff) | |
download | libbu++-bb9c0dc8dd2c852d9b6e89b9fd883232019cea93.tar.gz libbu++-bb9c0dc8dd2c852d9b6e89b9fd883232019cea93.tar.bz2 libbu++-bb9c0dc8dd2c852d9b6e89b9fd883232019cea93.tar.xz libbu++-bb9c0dc8dd2c852d9b6e89b9fd883232019cea93.zip |
Fixed a silly bug in the taf system that interpreted the */ at the end of a
comment block as a tag...oops.
Diffstat (limited to 'src/tests/taf.cpp')
-rw-r--r-- | src/tests/taf.cpp | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/src/tests/taf.cpp b/src/tests/taf.cpp index cb9b75f..d832c9b 100644 --- a/src/tests/taf.cpp +++ b/src/tests/taf.cpp | |||
@@ -2,23 +2,37 @@ | |||
2 | #include "bu/tafwriter.h" | 2 | #include "bu/tafwriter.h" |
3 | #include "bu/file.h" | 3 | #include "bu/file.h" |
4 | 4 | ||
5 | int main() | 5 | int main( int argc, char *argv[] ) |
6 | { | 6 | { |
7 | Bu::File f("test.taf", "rb"); | 7 | if( argc == 1 ) |
8 | Bu::TafReader tr( f ); | 8 | { |
9 | Bu::File f("test.taf", "rb"); | ||
10 | Bu::TafReader tr( f ); | ||
11 | |||
12 | Bu::TafGroup *pGroup = tr.readGroup(); | ||
13 | |||
14 | { | ||
15 | Bu::File fo("out.taf", "wb"); | ||
16 | Bu::TafWriter tw( fo ); | ||
17 | tw.writeGroup( pGroup ); | ||
18 | } | ||
9 | 19 | ||
10 | Bu::TafGroup *pGroup = tr.readGroup(); | 20 | delete pGroup; |
11 | /* | 21 | } |
12 | const Bu::TafGroup *pStats = pGroup->getChild("stats"); | 22 | else if( argc == 3 ) |
13 | printf("%s\n", pStats->getName().getStr() ); | ||
14 | printf(" str = %s\n", pStats->getProperty("str").getStr() );*/ | ||
15 | /* | ||
16 | { | 23 | { |
17 | Bu::File fo("out.taf", "wb"); | 24 | Bu::File f( argv[1], "rb"); |
18 | Bu::TafWriter tw( fo ); | 25 | Bu::TafReader tr( f ); |
19 | tw.writeGroup( pGroup ); | 26 | |
20 | }*/ | 27 | Bu::TafGroup *pGroup = tr.readGroup(); |
28 | |||
29 | { | ||
30 | Bu::File fo( argv[2], "wb"); | ||
31 | Bu::TafWriter tw( fo ); | ||
32 | tw.writeGroup( pGroup ); | ||
33 | } | ||
21 | 34 | ||
22 | delete pGroup; | 35 | delete pGroup; |
36 | } | ||
23 | } | 37 | } |
24 | 38 | ||