         XCTAssertEqual(csvStr, "\(str)-1,\"\(str)-\"\"-2\"")
     }
     
+    /// Test delimiter: "\t"
+    func testDelimiter() {
+        let stream = OutputStream(toMemory: ())
+        stream.open()
+        
+        let config = CSVWriter.Configuration(delimiter: "\t")
+        let csv = try! CSVWriter.init(stream: stream, configuration: config)
+        csv.beginNewRecord()
+        try! csv.write(field: str + "-1")
+        try! csv.write(field: str + "-2")
+        
+        stream.close()
+        let data = stream.data!
+        let csvStr = String(data: data, encoding: .utf8)!
+        
+        XCTAssertEqual(csvStr, "\(str)-1\t\(str)-2")
+    }
+
+    /// Test newline: "\r\n"
+    func testNewline() {
+        let stream = OutputStream(toMemory: ())
+        stream.open()
+        
+        let config = CSVWriter.Configuration(newline: "\r\n")
+        let csv = try! CSVWriter.init(stream: stream, configuration: config)
+        csv.beginNewRecord()
+        try! csv.write(field: str + "-1")
+        csv.beginNewRecord()
+        try! csv.write(field: str + "-2")
+        
+        stream.close()
+        let data = stream.data!
+        let csvStr = String(data: data, encoding: .utf8)!
+        
+        XCTAssertEqual(csvStr, "\(str)-1\r\n\(str)-2")
+    }
+    
+    /// UTF16 Big Endian
+    func testUTF16BE() {
+        let stream = OutputStream(toMemory: ())
+        stream.open()
+        
+        let csv = try! CSVWriter(stream: stream, codecType: UTF16.self, endian: .big)
+        csv.beginNewRecord()
+        try! csv.write(field: str)
+        
+        stream.close()
+        let data = stream.data!
+        let csvStr = String(data: data, encoding: .utf16BigEndian)!
+        
+        XCTAssertEqual(csvStr, str)
+    }
+
+    /// UTF16 Little Endian
+    func testUTF16LE() {
+        let stream = OutputStream(toMemory: ())
+        stream.open()
+        
+        let csv = try! CSVWriter(stream: stream, codecType: UTF16.self, endian: .little)
+        csv.beginNewRecord()
+        try! csv.write(field: str)
+        
+        stream.close()
+        let data = stream.data!
+        let csvStr = String(data: data, encoding: .utf16LittleEndian)!
+        
+        XCTAssertEqual(csvStr, str)
+    }
+    
+    /// UTF32 Big Endian
+    func testUTF32BE() {
+        let stream = OutputStream(toMemory: ())
+        stream.open()
+        
+        let csv = try! CSVWriter(stream: stream, codecType: UTF32.self, endian: .big)
+        csv.beginNewRecord()
+        try! csv.write(field: str)
+        
+        stream.close()
+        let data = stream.data!
+        let csvStr = String(data: data, encoding: .utf32BigEndian)!
+        
+        XCTAssertEqual(csvStr, str)
+    }
+    
+    /// UTF32 Little Endian
+    func testUTF32LE() {
+        let stream = OutputStream(toMemory: ())
+        stream.open()
+        
+        let csv = try! CSVWriter(stream: stream, codecType: UTF32.self, endian: .little)
+        csv.beginNewRecord()
+        try! csv.write(field: str)
+        
+        stream.close()
+        let data = stream.data!
+        let csvStr = String(data: data, encoding: .utf32LittleEndian)!
+        
+        XCTAssertEqual(csvStr, str)
+    }
+    
 }

        ("testMultipleFieldMultipleRecord", testMultipleFieldMultipleRecord),
        ("testQuoted", testQuoted),
        ("testQuotedNewline", testQuotedNewline),
        ("testEscapeQuote", testEscapeQuote)
    ]
    
    /// xxxx
    func testSingleFieldSingleRecord() {
        let str = "TEST-test-1234-😄😆👨‍👩‍👧‍👦"
        
        let stream = OutputStream(toMemory: ())
        stream.open()
        

    /// xxxx
    /// xxxx
    func testSingleFieldMultipleRecord() {
        let stream = OutputStream(toMemory: ())
        stream.open()
        
