status quo
This commit is contained in:
parent
4bcae370c6
commit
d67b89869f
|
@ -3,6 +3,8 @@ package com.rusefi.test;
|
||||||
import com.rusefi.VariableRegistry;
|
import com.rusefi.VariableRegistry;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringReader;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -68,4 +70,12 @@ public class VariableRegistryTest {
|
||||||
input.put(3, "N");
|
input.put(3, "N");
|
||||||
assertEquals("0=\"NONE\",1=\"A\",3=\"N\",2=\"Z\"", VariableRegistry.getHumanSortedTsKeyValueString(input));
|
assertEquals("0=\"NONE\",1=\"A\",3=\"N\",2=\"Z\"", VariableRegistry.getHumanSortedTsKeyValueString(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDefineAndQuotes() throws IOException {
|
||||||
|
VariableRegistry registry = new VariableRegistry();
|
||||||
|
registry.readPrependValues(new StringReader("#define SINGLE 'L'\n" +
|
||||||
|
"#define DOUBLE \"R\""));
|
||||||
|
assertEquals("hello 'L' \"R\" 'L' \"R\"", registry.applyVariables("hello @@SINGLE@@ @@DOUBLE@@ @@SINGLE@@ @@DOUBLE@@"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue