package com.andrewlalis.perfin.data.util;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class FileUtilTest {
    @Test
    public void testEscapeCSVText() {
        assertEquals("regular_value", FileUtil.escapeCSVText("regular_value"));
        assertEquals("\"\"\"\"", FileUtil.escapeCSVText("\""));
        assertEquals("\"\"\",\"\"\"", FileUtil.escapeCSVText("\",\""));
        assertEquals("\"and, this\"", FileUtil.escapeCSVText("and, this"));
        assertEquals("\"1,345.43\"", FileUtil.escapeCSVText("1,345.43"));
    }
}
