Here is a new test case that fails
daveloyall opened this issue · comments
Hi. java-to-graphviz will create a .dot
file for the following test case, but the dot file is invalid, so dot.exe
fails to render it and sets an errorlevel.
package scratch;
public class TestCasePercentInStringLiteral {
public static void main(String[] args) {
System.out.println("\"");
}
}
The dot language file it currently creates contains this line:
label = "\"\\"\"";
But, it should create this line instead, I guess:
label = "\"\\\"\"";
Actually, instead of adding a new class.. you could add this line to Expressions2.java
:
String s2 = "\"";
Then after generating the expected output using WRITE_EXPECTED_OUTPUT = true
, manually alter com.example.input.Expressions2-0.dot
so it contains the correct label = "\"\\\"\"";
.
Once that is done.. the test will fail near where the code change is needed, instead of waiting all the way to the execution of dot.exe
!
Cheers, good to see someone's actually using this thing. Will try to recreate here and create a fix.
OK have created a fix and updated the test inputs and outputs.
( also upgraded to graphviz 3 locally, which changes the PNG output slightly )