20 std::string testdata_path;
28 assert(result->size() == 8);
30 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
31 assert((*i)->name() ==
"bank");
32 assert((*i)->property(
"name"));
34 for(XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) {
42 result = doc.
find(
"/rosegarden-data/studio/device/bank/program[contains(@name, 'Latin')]");
43 assert(result->size() == 5);
45 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
53 std::string testsession_path;
57 result = doc2.
find(
"/Session/Sources/Source[contains(@captured-for, 'Guitar')]");
58 assert(result->size() == 16);
60 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
67 result = doc2.
find(
"//*[@id and @name]");
69 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
70 assert((*i)->property(
"id"));
71 assert((*i)->property(
"name"));
79 std::string testmidnam_path;
84 result = doc3.
find(
"/MIDINameDocument/MasterDeviceNames/ChannelNameSet[@Name='Name Set 1']/PatchBank");
85 assert(result->size() == 16);
87 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
90 for(XMLSharedNodeList::const_iterator p = patches->begin(); p != patches->end(); ++p) {
97 result = doc3.
find(
"//@Value");
99 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
107 "//ChannelNameSet[@Name = 'Name Set 1']//AvailableChannel[@Available = 'true']/@Channel");
109 assert(result->size() == 15);
110 for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
boost::shared_ptr< XMLSharedNodeList > find(const std::string xpath, XMLNode *=0) const
bool find_file(const Searchpath &search_path, const string &filename, std::string &result)
PBD::Searchpath test_search_path()
CPPUNIT_TEST_SUITE_REGISTRATION(XPathTest)