Beispiel #1
0
    def test2(self) :
        s = """menu=OneItem oneitem.html
////oneitem.html
blah"""
        bd = BootDown("",s)
        self.assertEquals(bd.atts["menu"],"""<ul class="nav navbar-nav">
<li><a href="oneitem.html">OneItem</a></li>
</ul>""")               
Beispiel #2
0
    def test1(self) :
        s = """menu=About about.html, Synaesmedia http://synaesmedia.net
////page1.html
blah blah"""
        bd = BootDown("",s)        
        self.assertEquals(bd.atts["menu"],"""<ul class="nav navbar-nav">
<li><a href="about.html">About</a></li>
<li><a href="http://synaesmedia.net">Synaesmedia</a></li>
</ul>""")
Beispiel #3
0
    def test2(self) :
        s = """title=Hello World    
//// page1.html
page 1"""        
        bd = BootDown("",s)
        self.assertEquals(len(bd.pages),1)
        self.assertEquals(bd.atts["title"],"Hello World")
        self.assertEquals(bd.pages[0].name,"page1.html")
        self.assertEquals(bd.pages[0].body,"<p>page 1</p>")
Beispiel #4
0
    def testMulti(self) :
        s = """blah=Blah
////index.html
[.another/green#world xyz .]"""
        bd = BootDown("",s)
        p = bd.pages[0]
        self.assertEquals(p.body,"""
<div class="another green" id="world">
<p>xyz</p>
</div>
""")
Beispiel #5
0
    def test3(self) :
        s = """title=Hello World
menu=a a.com, b b.com        
//// page1.html
page 1
//// page2.html
Page 2

*  list"""
        bd = BootDown("",s)
        self.assertEquals(len(bd.pages),2)
        self.assertEquals(bd.atts["title"],"Hello World")
        p2= bd.pages[1]
        self.assertEquals(p2.name,"page2.html")
        self.assertEquals(p2.body,"""<p>Page 2</p>
<ul>
<li>list</li>
</ul>""")
Beispiel #6
0
    def test1(self) :
        s = """dummy=blah
////page1.html
[.row#r1

[.span3

# Page 5

[.hoo#boo hello inside .]
.]

.]"""
        bd = BootDown("",s)
        p = bd.pages[0]
        self.assertEquals(p.body.replace("\n",""),"""<div class="row" id="r1">
<div class="span3">
<h1>Page 5</h1>
<div class="hoo" id="boo">
<p>hello inside</p>
</div>
</div>
</div>""".replace("\n",""))
Beispiel #7
0
 def test1(self) :
     s = "hello world"
     bd = BootDown("",s)
     self.assertEquals(bd.pages,[])