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

Merge pull request #3207 from nakengelhardt/json_escape_quotes

fix handling of escaped chars in json backend and frontend (mostly)
This commit is contained in:
Miodrag Milanović 2022-03-04 13:57:32 +01:00 committed by GitHub
commit c3124023e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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