diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2022-03-04 13:57:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 13:57:32 +0100 |
commit | c3124023e441c99dbdff40cb730d5b05499a378d (patch) | |
tree | 4c1aea11c042553307d7c5895be6f4df480ed13c /tests | |
parent | 7be7f5e02eaa0ed0ade5d6119fb2f2340586b67d (diff) | |
parent | 8fd1b062491f9ba1f0aed570086e7697731502d4 (diff) | |
download | yosys-c3124023e441c99dbdff40cb730d5b05499a378d.tar.gz yosys-c3124023e441c99dbdff40cb730d5b05499a378d.tar.bz2 yosys-c3124023e441c99dbdff40cb730d5b05499a378d.zip |
Merge pull request #3207 from nakengelhardt/json_escape_quotes
fix handling of escaped chars in json backend and frontend (mostly)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/various/.gitignore | 1 | ||||
-rw-r--r-- | tests/various/json_escape_chars.ys | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/various/.gitignore b/tests/various/.gitignore index 2bb6c7179..c6373468a 100644 --- a/tests/various/.gitignore +++ b/tests/various/.gitignore @@ -5,3 +5,4 @@ /run-test.mk /plugin.so /plugin.so.dSYM +/temp diff --git a/tests/various/json_escape_chars.ys b/tests/various/json_escape_chars.ys new file mode 100644 index 000000000..f118357c0 --- /dev/null +++ b/tests/various/json_escape_chars.ys @@ -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 |