'Test merging of files'

def test_merge_file(self):

    book = get_simple_book()
    c = get_container(book)
    merge(c, u'text', (u'index_split_000.html', u'index_split_001.html'), u'index_split_000.html')
    self.check_links(c)
    book = get_simple_book()
    c = get_container(book)
    (one, two) = (u'one/one.html', u'two/two.html')
    c.add_file(one, '<head><link    href="../stylesheet.css"><p><a    name="one"    href="../two/two.html">1</a><a    name="two"    href="../two/two.html#one">2</a>')
    c.add_file(two, '<head><link    href="../page_styles.css"><p><a    name="one"    href="two.html#two">1</a><a    name="two"    href="../one/one.html#one">2</a><a    href="#one">3</a>')
    merge(c, u'text', (one, two), one)
    self.check_links(c)
    root = c.parsed(one)
    self.assertEqual(1, len(root.xpath(u'//*[@href="../page_styles.css"]')))
    book = get_simple_book()
    c = get_container(book)
    merge(c, u'styles', (u'stylesheet.css', u'page_styles.css'), u'stylesheet.css')
    self.check_links(c)
