Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: fe833d8fab
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 1.315 kB
/*
* Copyright 2009-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.liftweb
package json
import util.control.Exception._
import org.specs.Specification
object ParserBugs extends Specification {
"Unicode ffff is a valid char in string literal" in {
parseOpt(""" {"x":"\uffff"} """).isDefined mustEqual true
}
"Does not hang when parsing 2.2250738585072012e-308" in {
allCatch.opt(parse(""" [ 2.2250738585072012e-308 ] """)) mustEqual None
allCatch.opt(parse(""" [ 22.250738585072012e-309 ] """)) mustEqual None
}
"Does not allow colon at start of array" in {
parseOpt("""[:"foo", "bar"]""") mustEqual None
}
"Does not allow colon instead of comma in array" in {
parseOpt("""["foo" : "bar"]""") mustEqual None
}
}
Jump to Line
Something went wrong with that request. Please try again.