     
     func testLineBreakCR() {
         let csv = "qwe,asd\rzxc,rty"
-        let encoding = NSUTF8StringEncoding
-        let records = parseCSV(csv, encoding: encoding)
+        let encoding = String.Encoding.utf8
+        let records = parse(csv: csv, encoding: encoding)
         XCTAssertEqual(records.count, 2)
         XCTAssertEqual(records[0], ["qwe", "asd"])
         XCTAssertEqual(records[1], ["zxc", "rty"])


    func testLineBreakCRCR() {
        let csv = "qwe,asd\r\rzxc,rty"
        let encoding = NSUTF8StringEncoding
        let records = parseCSV(csv, encoding: encoding)
        XCTAssertEqual(records.count, 3)
        XCTAssertEqual(records[0], ["qwe", "asd"])
        XCTAssertEqual(records[1], [""])


    func test1Line() {
        let csv = "abab,cdcd,efef"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "cdcd", "efef"])
    }

    func testQuoted() {
        let csv = "abab,\"cdcd\",efef"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "cdcd", "efef"])
    }

    func testLF() {
        let csv = "abab,cdcd,efef\nzxcv,asdf,qwer"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qwer"])
    }

    func testCommaInQuotationMarks() {
        let csv = "abab,\"cd,cd\",efef"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "cd,cd", "efef"])
    }

    func testCRLF() {
        let csv = "abab,cdcd,efef\r\nzxcv,asdf,qwer"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qwer"])
    }

    func testEscapedQuotationMark() {
        let csv = "abab,\"\"\"cdcd\",efef\r\nzxcv,asdf,qwer"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "\"cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qwer"])
    }

    func testQuotationMark2() {
        let csv = "abab,cdcd,efef\r\nzxcv,asdf,\"qw\"\"er\""
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qw\"er"])
    }

    func testEmptyField() {
        let csv = "abab,,cdcd,efef\r\nzxcv,asdf,\"qw\"\"er\","
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "", "cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qw\"er", ""])
    }

    func testLastCR() {
        let csv = "abab,,cdcd,efef\r\nzxcv,asdf,\"qw\"\"er\",\r"
        let encoding = String.Encoding.utf8
        let records = parse(csv: csv, encoding: encoding)
        XCTAssertEqual(records.count, 2)
        XCTAssertEqual(records[0], ["abab", "", "cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qw\"er", ""])
