mirror of https://github.com/tasks/tasks
Strip CR from google task descriptions
Tasks created in OneTask for Windows were only sending a CRpull/795/head
parent
74cf0fc378
commit
acc0dda646
@ -0,0 +1,26 @@
|
||||
package com.todoroo.astrid.gtasks.sync;
|
||||
|
||||
import static com.todoroo.astrid.gtasks.sync.GtasksTaskContainer.stripCarriageReturns;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class GtasksTaskContainerTest {
|
||||
@Test
|
||||
public void replaceCRLF() {
|
||||
assertEquals("aaa\nbbb", stripCarriageReturns("aaa\r\nbbb"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void replaceCR() {
|
||||
assertEquals("aaa\nbbb", stripCarriageReturns("aaa\rbbb"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void dontReplaceLF() {
|
||||
assertEquals("aaa\nbbb", stripCarriageReturns("aaa\nbbb"));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue