diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-09 00:12:22 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-09 00:12:22 +0900 |
| commit | b447618c33683b947c1fb26f1e7cd9033e20e5cb (patch) | |
| tree | c62d4d9bc5c119ae94022e0a3f8e8d0a085b0190 /tests | |
| parent | 32b15c9dbfec14417bb0a4e04c0eaa8a8028fd42 (diff) | |
| download | ducc-b447618c33683b947c1fb26f1e7cd9033e20e5cb.tar.gz ducc-b447618c33683b947c1fb26f1e7cd9033e20e5cb.tar.zst ducc-b447618c33683b947c1fb26f1e7cd9033e20e5cb.zip | |
feat: support CRLF and CR
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/121.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/121.sh b/tests/121.sh new file mode 100644 index 0000000..a5ecdb6 --- /dev/null +++ b/tests/121.sh @@ -0,0 +1,16 @@ +cat <<'EOF' > expected +Hello World +Line continues +EOF + +# CRLF +printf 'int printf(const char*, ...);\r\nint main() {\r\n printf("Hello World\\n");\r\n printf("Line con\\\r\ntinues\\n");\r\n return 0;\r\n}\r\n' > main_crlf.c +test_diff < main_crlf.c + +# CR +printf 'int printf(const char*, ...);\rint main() {\r printf("Hello World\\n");\r printf("Line con\\\rtinues\\n");\r return 0;\r}\r' > main_cr.c +test_diff < main_cr.c + +# Mixed +printf 'int printf(const char*, ...);\nint main() {\r\n printf("Hello World\\n");\r printf("Line con\\\r\ntinues\\n");\n return 0;\r\n}\r\n' > main_mixed.c +test_diff < main_mixed.c |
