diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-05-10 18:45:39 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-05-10 18:45:39 +0000 |
| commit | ef4140ebe2edf877c936508747cd0a232427ae79 (patch) | |
| tree | a945b9e06d39b83bb6320c758d0723cb95aff8e4 /src | |
| parent | Convert fixed paths to relative, including .. (diff) | |
| parent | Fix test case to compile. (diff) | |
| download | inkscape-ef4140ebe2edf877c936508747cd0a232427ae79.tar.gz inkscape-ef4140ebe2edf877c936508747cd0a232427ae79.zip | |
Commit test.
(bzr r10206)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dir-util-test.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dir-util-test.h b/src/dir-util-test.h index 8f8475873..cc3bc20b8 100644 --- a/src/dir-util-test.h +++ b/src/dir-util-test.h @@ -17,17 +17,17 @@ public: {"/foo/bar/baz", "/foo/", "bar/baz"}, {"/foo/bar/baz", "/", "foo/bar/baz"}, {"/foo/bar/baz", "/foo/qux", "/foo/bar/baz"}, - {"/foo", NULL, "/foo"} }; for ( size_t i = 0; i < G_N_ELEMENTS(cases); i++ ) { - char const* result = sp_relative_path_from_path( cases[i][0], cases[i][1] ); - TS_ASSERT( result ); - TS_ASSERT( cases[i][2] ); - if ( result && cases[i][2] ) - { - TS_ASSERT_EQUALS( std::string(result), std::string(cases[i][2]) ); + if ( cases[i][0] && cases[i][1] ) { // std::string can't use null. + std::string result = sp_relative_path_from_path( cases[i][0], cases[i][1] ); + TS_ASSERT( !result.empty() ); + if ( !result.empty() ) + { + TS_ASSERT_EQUALS( result, std::string(cases[i][2]) ); + } } } } |
