Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2.10: lift-util

  • Loading branch information...
commit 5280bc81c09e74580fd28696f1a24cd9853b78e2 1 parent 3115101
@nafg nafg authored
View
3  core/util/src/main/scala/net/liftweb/util/CssSelector.scala
@@ -177,9 +177,10 @@ object CssSelectorParser extends PackratParsers with ImplicitConversions {
}
}
+ private val atEnd = Parser { in => if(in.atEnd) Success(CharSequenceReader.EofCh, in) else Failure("", in)}
private lazy val topParser: Parser[CssSelector] =
phrase(rep1((_idMatch | _nameMatch | _classMatch | _attrMatch | _elemMatch |
- _colonMatch | _starMatch) <~ (rep1(' ') | 26.toChar)) ~ opt(subNode)) ^^ {
+ _colonMatch | _starMatch) <~ (rep1(' ') | atEnd)) ~ opt(subNode)) ^^ {
case (one :: Nil) ~ sn => fixAll(List(one), sn)
case all ~ None if all.takeRight(1).head == StarSelector(Empty) =>
fixAll(all.dropRight(1), Some(KidsSubNode()))
View
4 core/util/src/test/scala/net/liftweb/util/ClassHelpersSpec.scala
@@ -173,11 +173,11 @@ object ClassHelpersSpec extends Specification {
"return Empty if the instance is null" in {
createInvoker("length", null) must_== Empty
}
- "return a Full can with the function from Unit to a can containing the result of the method to invoke" in {
+ "return a Full Box with the function from Unit to a Box containing the result of the method to invoke" in {
createInvoker("length", "").openOrThrowException("Test").apply().get must_== 0
}
"The invoker function will throw the cause exception if the method can't be called" in {
- createInvoker("get", "").openOrThrowException("Test").apply must throwA[Exception]
+ (() => createInvoker("get", "").openOrThrowException("Test").apply)() must throwA[Exception]
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.