diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-01 10:15:13 -0700 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-01 10:15:13 -0700 |
commit | c0b06c5e3f3caa60736794143f278c2af5cbe9fb (patch) | |
tree | f66c244943702c46daee94aaa1b98a07d6542830 /scalatexApi/src/test/scala/scalatex/BasicTests.scala | |
parent | aae594fd3c8397abca4cd4e55f538d41b172b4e3 (diff) | |
download | hands-on-scala-js-c0b06c5e3f3caa60736794143f278c2af5cbe9fb.tar.gz hands-on-scala-js-c0b06c5e3f3caa60736794143f278c2af5cbe9fb.tar.bz2 hands-on-scala-js-c0b06c5e3f3caa60736794143f278c2af5cbe9fb.zip |
scalatex tests pass
Diffstat (limited to 'scalatexApi/src/test/scala/scalatex/BasicTests.scala')
-rw-r--r-- | scalatexApi/src/test/scala/scalatex/BasicTests.scala | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/scalatexApi/src/test/scala/scalatex/BasicTests.scala b/scalatexApi/src/test/scala/scalatex/BasicTests.scala index 0488ef6..f432e51 100644 --- a/scalatexApi/src/test/scala/scalatex/BasicTests.scala +++ b/scalatexApi/src/test/scala/scalatex/BasicTests.scala @@ -74,7 +74,6 @@ object BasicTests extends TestSuite{ 'attributes{ check( tw(""" - @div(id:="my-id") omg @div(id:="my-id"){ omg } @div(id:="my-id") omg @@ -82,7 +81,6 @@ object BasicTests extends TestSuite{ """ <divid="my-id">omg</div> <divid="my-id">omg</div> - <divid="my-id">omg</div> """ ) } @@ -134,11 +132,12 @@ object BasicTests extends TestSuite{ check( tw(""" - @h1 Hello World - @h2 hello - @world + @h1 + Hello World + @h2 + hello @world @h3 - Cow + Cow """), """ <h1>HelloWorld</h1> @@ -157,9 +156,9 @@ object BasicTests extends TestSuite{ @div Cow """), """ - <h1><span></span><a></a>HelloWorld</h1> - <h2><span></span><a></a>hello<b>world</b></h2> - <h3><i></i><div>Cow</div></h3> + <h1></h1><span></span><a></a>HelloWorld + <h2></h2><span></span><a></a>hello<b></b>world + <h3></h3><i></i><div></div>Cow """ ) } @@ -213,7 +212,7 @@ object BasicTests extends TestSuite{ <div> Hello <div> - <h1>WORLD<b>!!!</b>lol</h1> + <h1></h1>WORLD<b>!!!</b>lol <p><h2>Header2</h2></p> </div> </div> @@ -227,13 +226,15 @@ object BasicTests extends TestSuite{ tw(""" @ul @things.map { x => - @li @x + @li + @x } """), - tw(""" + Internals.twDebug(""" @ul - @things.map x => - @li @x + @things.map x => + @li + @x """), """ @@ -319,7 +320,8 @@ object BasicTests extends TestSuite{ tw(""" @if(false) Hello - @else lols + @else + lols @p """), "lols<p></p>" @@ -330,7 +332,8 @@ object BasicTests extends TestSuite{ @div @if(true) Hello - @else lols + @else + lols """), "<div>Hello</div>" ) @@ -338,15 +341,19 @@ object BasicTests extends TestSuite{ * - check( tw(""" @div - @if(true) Hello - @else lols + @if(true) + Hello + @else + lols """), "<div>Hello</div>" ) * - check( tw(""" - @if(false) Hello - @else lols + @if(false) + Hello + @else + lols """), "lols" ) |