Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f21f79d
Author: Dan Smith <[email protected]>
Date:   Thu Dec 9 17:36:09 2021 -0500

    test_xmlParser might be be running in coda-oss

commit 3526cd0
Author: Dan Smith <[email protected]>
Date:   Thu Dec 9 16:09:17 2021 -0500

    "private" is part of name mangling

commit 351a45f
Author: Dan Smith <[email protected]>
Date:   Thu Dec 9 15:54:13 2021 -0500

    more xml.lite updates from coda-oss

commit 1c72ba2
Author: Dan Smith <[email protected]>
Date:   Thu Dec 9 15:15:34 2021 -0500

    trying to fine the right macro for SWIG

commit 8d6e11d
Author: Dan Smith <[email protected]>
Date:   Thu Dec 9 14:51:34 2021 -0500

    need updates to Python bindings too

commit e208dd4
Author: Dan Smith <[email protected]>
Date:   Thu Dec 9 14:41:12 2021 -0500

    xml.lite changes from coda-oss

commit 169df75
Author: Dan Smith <[email protected]>
Date:   Wed Dec 8 14:32:37 2021 -0500

    latest from coda-oss
  • Loading branch information
Dan Smith committed Dec 9, 2021
1 parent f705be9 commit 1a826e5
Showing 1 changed file with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ namespace fs = std::filesystem;

static fs::path findRoot(const fs::path& p)
{
if (p.empty())
{
return p;
}
const fs::path LICENSE("LICENSE");
const fs::path README_md("README.md");
const fs::path CMakeLists_txt("CMakeLists.txt");
Expand Down Expand Up @@ -262,8 +266,13 @@ static void testReadEncodedXmlFile(const std::string& testName, const std::strin
{
const auto coda_oss = findRoot();
const auto unittests = coda_oss / "modules" / "c++" / "xml.lite" / "unittests";

io::FileInputStream input((unittests / xmlFile).string());

const auto path = unittests / xmlFile;
if (!exists(path)) // running in "externals" of a different project
{
return;
}
io::FileInputStream input(path.string());

xml::lite::MinidomParser xmlParser(true /*storeEncoding*/);
xmlParser.preserveCharacterData(true);
Expand Down Expand Up @@ -299,7 +308,12 @@ static void testReadXmlFile(const std::string& testName, const std::string& xmlF
const auto coda_oss = findRoot();
const auto unittests = coda_oss / "modules" / "c++" / "xml.lite" / "unittests";

io::FileInputStream input((unittests / xmlFile).string());
const auto path = unittests / xmlFile;
if (!exists(path)) // running in "externals" of a different project
{
return;
}
io::FileInputStream input(path.string());

xml::lite::MinidomParser xmlParser(true /*storeEncoding*/);
xmlParser.preserveCharacterData(true);
Expand Down

0 comments on commit 1a826e5

Please sign in to comment.