package mlp.text;

import org.junit.Test;

import static junit.framework.Assert.assertEquals;

/**
 * Created by Moritz on 29.09.2015.
 */
public class UnicodeMapTest {

  @Test
  public void testString2TeX() throws Exception {
    String teX = UnicodeMap.string2TeX("Ĥψ=Eψ");
    assertEquals("\\hat{H}\\psi =E\\psi ", teX);
  }

  @Test
  public void testChar2TeX() throws Exception {
    String c = UnicodeMap.char2TeX(1153);
    assertEquals("\\cyrchar\\cyrkoppa ", c);
  }
}

@@ -309,17 +309,16 @@
  =E%5C%5Cpsi
- 
 %22, teX);

fix test: accept trimmed TeX code