3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

fix handling of escaped chars in json backend and frontend

This commit is contained in:
N. Engelhardt 2022-02-18 17:13:09 +01:00
parent 1586000048
commit 8fd1b06249
5 changed files with 63 additions and 5 deletions

View file

@ -5,3 +5,4 @@
/run-test.mk
/plugin.so
/plugin.so.dSYM
/temp

View file

@ -0,0 +1,14 @@
! mkdir -p temp
read_verilog <<EOT
(* src = "\042 \057 \134 \010 \014 \012 \015 \011 \025 \033" *)
module foo;
endmodule
EOT
write_json temp/test_escapes.json
design -reset
read_json temp/test_escapes.json
write_json temp/test_escapes.json
design -reset
read_json temp/test_escapes.json
write_rtlil temp/test_escapes.json.il
! grep -F 'attribute \src "\" / \\ \010 \014 \n \015 \t \025 \033"' temp/test_escapes.json.il