From ae5d1baab17fcf74ab81831ed5913883f45735e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Fri, 10 May 2024 21:21:20 -0300 Subject: [PATCH] Added unit tests for text encoding. Updated the CI scripts. Clean up libzip files with invalid characters. --- .ecode/project_build.json | 14 + .github/workflows/eepp-linux-build-check.yml | 11 +- .github/workflows/eepp-macos-build-check.yml | 6 + .../workflows/eepp-windows-build-check.yml | 12 +- .gitignore | 1 + .../textformat/chinese.utf16be.crlf.bom.txt | Bin 0 -> 3366 bytes .../textformat/chinese.utf16be.crlf.nobom.txt | Bin 0 -> 3364 bytes .../textformat/chinese.utf16be.lf.bom.txt | Bin 0 -> 3270 bytes .../textformat/chinese.utf16be.lf.nobom.txt | Bin 0 -> 3268 bytes .../textformat/chinese.utf16le.crlf.bom.txt | Bin 0 -> 3366 bytes .../textformat/chinese.utf16le.crlf.nobom.txt | Bin 0 -> 3364 bytes .../textformat/chinese.utf16le.lf.bom.txt | Bin 0 -> 3270 bytes .../textformat/chinese.utf16le.lf.nobom.txt | Bin 0 -> 3268 bytes .../textformat/chinese.utf8.crlf.bom.txt | 48 + .../textformat/chinese.utf8.crlf.nobom.txt | 48 + .../assets/textformat/chinese.utf8.lf.bom.txt | 48 + .../textformat/chinese.utf8.lf.nobom.txt | 48 + .../textformat/english.utf16be.crlf.bom.txt | Bin 0 -> 7982 bytes .../textformat/english.utf16be.crlf.nobom.txt | Bin 0 -> 7980 bytes .../textformat/english.utf16be.lf.bom.txt | Bin 0 -> 7862 bytes .../textformat/english.utf16be.lf.nobom.txt | Bin 0 -> 7860 bytes .../textformat/english.utf16le.crlf.bom.txt | Bin 0 -> 7982 bytes .../textformat/english.utf16le.crlf.nobom.txt | Bin 0 -> 7980 bytes .../textformat/english.utf16le.lf.bom.txt | Bin 0 -> 7862 bytes .../textformat/english.utf16le.lf.nobom.txt | Bin 0 -> 7860 bytes .../textformat/english.utf8.crlf.bom.txt | 60 + .../textformat/english.utf8.crlf.nobom.txt | 60 + .../assets/textformat/english.utf8.lf.bom.txt | 60 + .../textformat/english.utf8.lf.nobom.txt | 60 + .../textformat/french.utf16be.crlf.bom.txt | Bin 0 -> 7574 bytes .../textformat/french.utf16be.crlf.nobom.txt | Bin 0 -> 7572 bytes .../textformat/french.utf16be.lf.bom.txt | Bin 0 -> 7442 bytes .../textformat/french.utf16be.lf.nobom.txt | Bin 0 -> 7440 bytes .../textformat/french.utf16le.crlf.bom.txt | Bin 0 -> 7574 bytes .../textformat/french.utf16le.crlf.nobom.txt | Bin 0 -> 7572 bytes .../textformat/french.utf16le.lf.bom.txt | Bin 0 -> 7442 bytes .../textformat/french.utf16le.lf.nobom.txt | Bin 0 -> 7440 bytes .../textformat/french.utf8.crlf.bom.txt | 66 + .../textformat/french.utf8.crlf.nobom.txt | 66 + .../assets/textformat/french.utf8.lf.bom.txt | 66 + .../textformat/french.utf8.lf.nobom.txt | 66 + .../textformat/french.win1252.crlf.nobom.txt | 66 + .../textformat/french.win1252.lf.nobom.txt | 66 + .../japanese.shiftjis.crlf.nobom.txt | 48 + .../textformat/japanese.shiftjis.lf.nobom.txt | 48 + .../textformat/japanese.utf16be.crlf.bom.txt | Bin 0 -> 4164 bytes .../japanese.utf16be.crlf.nobom.txt | Bin 0 -> 4162 bytes .../textformat/japanese.utf16be.lf.bom.txt | Bin 0 -> 4068 bytes .../textformat/japanese.utf16be.lf.nobom.txt | Bin 0 -> 4066 bytes .../textformat/japanese.utf16le.crlf.bom.txt | Bin 0 -> 4164 bytes .../japanese.utf16le.crlf.nobom.txt | Bin 0 -> 4162 bytes .../textformat/japanese.utf16le.lf.bom.txt | Bin 0 -> 4068 bytes .../textformat/japanese.utf16le.lf.nobom.txt | Bin 0 -> 4066 bytes .../textformat/japanese.utf8.crlf.bom.txt | 48 + .../textformat/japanese.utf8.crlf.nobom.txt | 48 + .../textformat/japanese.utf8.lf.bom.txt | 48 + .../textformat/japanese.utf8.lf.nobom.txt | 48 + premake4.lua | 7 + premake5.lua | 7 + projects/linux/ee.creator.user | 26 +- projects/linux/ee.files | 3 + src/eepp/ui/doc/textformat.cpp | 21 +- src/tests/unit_tests/main.cpp | 3 + src/tests/unit_tests/textformat.cpp | 104 + src/tests/unit_tests/utest.h | 1700 +++++++++++++++++ src/thirdparty/libzip/zip.h | 6 +- src/thirdparty/libzip/zip_add.c | 8 +- src/thirdparty/libzip/zip_add_dir.c | 8 +- src/thirdparty/libzip/zip_close.c | 64 +- src/thirdparty/libzip/zip_delete.c | 8 +- src/thirdparty/libzip/zip_dirent.c | 36 +- src/thirdparty/libzip/zip_entry_free.c | 4 +- src/thirdparty/libzip/zip_entry_new.c | 4 +- src/thirdparty/libzip/zip_err_str.c | 2 +- src/thirdparty/libzip/zip_error.c | 16 +- src/thirdparty/libzip/zip_error_clear.c | 4 +- src/thirdparty/libzip/zip_error_get.c | 4 +- .../libzip/zip_error_get_sys_type.c | 4 +- src/thirdparty/libzip/zip_error_strerror.c | 4 +- src/thirdparty/libzip/zip_error_to_str.c | 4 +- src/thirdparty/libzip/zip_fclose.c | 4 +- src/thirdparty/libzip/zip_fdopen.c | 4 +- src/thirdparty/libzip/zip_file_error_clear.c | 4 +- src/thirdparty/libzip/zip_file_error_get.c | 4 +- src/thirdparty/libzip/zip_file_get_offset.c | 4 +- src/thirdparty/libzip/zip_file_strerror.c | 4 +- src/thirdparty/libzip/zip_filerange_crc.c | 4 +- src/thirdparty/libzip/zip_fopen.c | 4 +- src/thirdparty/libzip/zip_fopen_encrypted.c | 4 +- src/thirdparty/libzip/zip_fopen_index.c | 4 +- .../libzip/zip_fopen_index_encrypted.c | 6 +- src/thirdparty/libzip/zip_fread.c | 4 +- src/thirdparty/libzip/zip_free.c | 4 +- .../libzip/zip_get_archive_comment.c | 4 +- src/thirdparty/libzip/zip_get_archive_flag.c | 4 +- .../zip_get_compression_implementation.c | 4 +- .../zip_get_encryption_implementation.c | 4 +- src/thirdparty/libzip/zip_get_file_comment.c | 4 +- src/thirdparty/libzip/zip_get_name.c | 6 +- src/thirdparty/libzip/zip_get_num_entries.c | 4 +- src/thirdparty/libzip/zip_get_num_files.c | 4 +- src/thirdparty/libzip/zip_memdup.c | 2 +- src/thirdparty/libzip/zip_name_locate.c | 6 +- src/thirdparty/libzip/zip_new.c | 4 +- src/thirdparty/libzip/zip_open.c | 24 +- src/thirdparty/libzip/zip_rename.c | 4 +- src/thirdparty/libzip/zip_replace.c | 6 +- .../libzip/zip_set_archive_comment.c | 4 +- src/thirdparty/libzip/zip_set_archive_flag.c | 4 +- .../libzip/zip_set_default_password.c | 4 +- src/thirdparty/libzip/zip_set_file_comment.c | 4 +- src/thirdparty/libzip/zip_set_name.c | 4 +- src/thirdparty/libzip/zip_source_buffer.c | 6 +- src/thirdparty/libzip/zip_source_close.c | 4 +- src/thirdparty/libzip/zip_source_crc.c | 6 +- src/thirdparty/libzip/zip_source_deflate.c | 14 +- src/thirdparty/libzip/zip_source_error.c | 4 +- src/thirdparty/libzip/zip_source_file.c | 4 +- src/thirdparty/libzip/zip_source_filep.c | 8 +- src/thirdparty/libzip/zip_source_free.c | 4 +- src/thirdparty/libzip/zip_source_function.c | 6 +- src/thirdparty/libzip/zip_source_layered.c | 4 +- src/thirdparty/libzip/zip_source_open.c | 4 +- src/thirdparty/libzip/zip_source_pkware.c | 14 +- src/thirdparty/libzip/zip_source_pop.c | 4 +- src/thirdparty/libzip/zip_source_read.c | 4 +- src/thirdparty/libzip/zip_source_stat.c | 4 +- src/thirdparty/libzip/zip_source_zip.c | 6 +- src/thirdparty/libzip/zip_stat.c | 4 +- src/thirdparty/libzip/zip_stat_index.c | 4 +- src/thirdparty/libzip/zip_stat_init.c | 4 +- src/thirdparty/libzip/zip_strerror.c | 4 +- src/thirdparty/libzip/zip_unchange.c | 6 +- src/thirdparty/libzip/zip_unchange_all.c | 4 +- src/thirdparty/libzip/zip_unchange_archive.c | 4 +- src/thirdparty/libzip/zip_unchange_data.c | 2 +- src/thirdparty/libzip/zipint.h | 16 +- 137 files changed, 3251 insertions(+), 254 deletions(-) create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16be.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16be.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16be.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16be.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16le.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16le.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16le.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf16le.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf8.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf8.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf8.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/chinese.utf8.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16be.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16be.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16be.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16be.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16le.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16le.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16le.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf16le.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf8.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf8.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf8.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/english.utf8.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16be.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16be.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16be.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16be.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16le.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16le.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16le.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf16le.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf8.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf8.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf8.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/french.utf8.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.win1252.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/french.win1252.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.shiftjis.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.shiftjis.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16be.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16be.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16be.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16be.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16le.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16le.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16le.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf16le.lf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf8.crlf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf8.crlf.nobom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf8.lf.bom.txt create mode 100644 bin/unit_tests/assets/textformat/japanese.utf8.lf.nobom.txt create mode 100644 src/tests/unit_tests/main.cpp create mode 100644 src/tests/unit_tests/textformat.cpp create mode 100644 src/tests/unit_tests/utest.h diff --git a/.ecode/project_build.json b/.ecode/project_build.json index 9d1547eaa..d42054499 100644 --- a/.ecode/project_build.json +++ b/.ecode/project_build.json @@ -172,6 +172,20 @@ "command": "ecode", "name": "ecode-release", "working_dir": "${project_root}/bin" + }, + { + "args": "", + "command": "eepp-unit_tests-debug", + "name": "eepp-unit_tests-debug", + "run_in_terminal": true, + "working_dir": "${project_root}/bin/unit_tests" + }, + { + "args": "", + "command": "eepp-unit_tests", + "name": "eepp-unit_tests", + "run_in_terminal": true, + "working_dir": "${project_root}/bin/unit_tests" } ], "var": { diff --git a/.github/workflows/eepp-linux-build-check.yml b/.github/workflows/eepp-linux-build-check.yml index 2de432d09..74f90b237 100644 --- a/.github/workflows/eepp-linux-build-check.yml +++ b/.github/workflows/eepp-linux-build-check.yml @@ -9,6 +9,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: + ref: ${{ github.ref }} fetch-depth: 2 - name: Checkout submodules run: | @@ -27,10 +28,14 @@ jobs: sudo update-alternatives --set c++ /usr/bin/g++ sudo update-alternatives --config gcc sudo update-alternatives --config g++ - wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-linux.tar.gz - tar xvzf premake-5.0.0-beta1-linux.tar.gz + wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz + tar xvzf premake-5.0.0-beta2-linux.tar.gz - name: Build run: | ./premake5 gmake2 cd make/linux - make all -j$(nproc) + make all -j$(nproc) -e config=release_x86_64 + - name: Unit Tests + run: | + cd bin/unit_tests + ./eepp-unit_tests diff --git a/.github/workflows/eepp-macos-build-check.yml b/.github/workflows/eepp-macos-build-check.yml index 377d251af..448ab471c 100644 --- a/.github/workflows/eepp-macos-build-check.yml +++ b/.github/workflows/eepp-macos-build-check.yml @@ -9,6 +9,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: + ref: ${{ github.ref }} fetch-depth: 2 - name: Checkout submodules run: | @@ -20,3 +21,8 @@ jobs: run: | premake5 gmake2 make -C make/macosx/ -e config=release_arm64 + - name: Unit Tests + run: | + cd bin/unit_tests + ./eepp-unit_tests + diff --git a/.github/workflows/eepp-windows-build-check.yml b/.github/workflows/eepp-windows-build-check.yml index 7e12351ca..83e6f7ddb 100644 --- a/.github/workflows/eepp-windows-build-check.yml +++ b/.github/workflows/eepp-windows-build-check.yml @@ -11,6 +11,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: + ref: ${{ github.ref }} fetch-depth: 2 - name: Checkout submodules run: | @@ -18,8 +19,8 @@ jobs: - name: Install dependencies shell: powershell run: | - Invoke-WebRequest -Uri "https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-windows.zip" -OutFile "premake-5.0.0-beta1-windows.zip" - Expand-Archive -DestinationPath . -Path premake-5.0.0-beta1-windows.zip + Invoke-WebRequest -Uri "https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip" -OutFile "premake-5.0.0-beta2-windows.zip" + Expand-Archive -DestinationPath . -Path premake-5.0.0-beta2-windows.zip - name: Create project shell: powershell run: | @@ -27,4 +28,9 @@ jobs: - name: Build shell: cmd run: | - "%MSBUILD_PATH%\MSBuild.exe" .\make\windows\eepp.sln -m /p:Platform="x64" + "%MSBUILD_PATH%\MSBuild.exe" .\make\windows\eepp.sln -m /p:Platform="x64" /p:Configuration="release" + - name: Unit Tests + shell: cmd + run: | + cd bin\unit_tests + ./eepp-unit_tests.exe diff --git a/.gitignore b/.gitignore index 729ca611d..a6eea083d 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ ecode.dmg /.ecode/.prjallowed /.cache/ /compile_commands.json +/bin/unit_tests/eepp-* diff --git a/bin/unit_tests/assets/textformat/chinese.utf16be.crlf.bom.txt b/bin/unit_tests/assets/textformat/chinese.utf16be.crlf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..c62f9bf644949f0f17a5362b9004a44b6b481542 GIT binary patch literal 3366 zcmZ8kaZnRi8ecNyFtSnT^*qb9L-A&WDwM75abD-zQ9K1reM_t!=S_wETj$EtGszb)(d5T^m#UGHNdyzlbdvV}vK#*a(R$pkYaOsb& z)kxteGv_Uk=OI&}w}4q-kE!n4VqRd)K#DfSL2{ z@D@0q(@5IVx(OMiqN<9>3708CfI5|Z_nE#!gy&V~b`+(<_{72?G=q$R$K)@o-(6PX za&O?M?Qc*9Shr0qO?Sb_)Bb5sL)Xh#x41W$Hmu#{9qHBP3S|*@imSMOHS=QYrpVg< z8(4os2uDaHT6c!I68?8{4g+l zF^~zT+A++TWLL5Cdf+jQ9GVVfnzJHnk&)6x+~N%_4`WV!pqpFvO8KE$DX;q)Tg_k8 z^5sihNzal`@|QastdCPVD#aTCD}~dR7np6`#nmL|+xrCc*?-VHBG`5ELXX*!bN9;V zQxU?S*&DYUl+F))0G)8lr5Dagw;a<#(~xraN?Wb1R>`Kra#$?w-2ySUa{K#_cV9yW zdp5UO%ea#r;{^onU57rz&eMO2%3#;^%}^QL_j3Jd530G0N=yq<5xY(*;(WfHwpz$r z+VGEo=kfWK-^yQNeTb#dSGPOft6%LZ#tb;GV>Hx?20ivMliTxZ&1Lg$M|<=OZgcNs z%eN+{r@{Fgu6g{zvontN$O(w@!Qeg4S@0+wrT>vh^UvwsO15nT*cVg=XW>uKmH-I~ z%8yJOR+@ezJsQ8z{}JX2`iY7p%@r+Qx%7v}s@o_Xf2g(yW!tknjda+fG+!52rR(o} zo$d;7flL&J8XJUd7Xe4#k+QHJ8wekyN#nB+`e9O)bnebX4w) ze}f3?E=u>zOY(EgtC@sUgu-{fx9)MAp(vQJT!9lUvJVKS!#u=%oT#gRroQlQ#t?!1 z(93j*reFgJ}WWvZ|fyU*vTf8JUPo z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XSpShnf^7k~$H3|ME(PNQp61yC=U-`i^Lfk5v|xD| zba%)y>4!;*eSkHnAy-i>0qiWIu&1%9BJCB}zgd6Pdd-OOjufXmvfdbd5EBA-u>>D3^~+wq^%D! z-p9;!KH|u6l-pi_{j22=vqZa@C5M)d@31*%8)9gsMlNfTchC$}pBGC&P2aSF(`p%N z2*+g-&Ck2^_G>kTSQBBZMvkn29yxq;BUAa@sbeB3u8N1{OKFDHli+yn_Njv#ItPKX4>huTdT>4V0A#A6(jABU z519t^%o%&%k;y$ecT2j?%e+}%z@5?_#2U2H>AMF7PNOX1URKArPV^01j#0z?9G*5l zfx`HWg`%zS)ad#J;>1<$aNnT2@bmN(1l>awmbsw?bRTA-XA&~N4B%r}S>h_$FNZLi z$V3Qk1N7P6I0~y{N)p@Q literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/chinese.utf16be.lf.bom.txt b/bin/unit_tests/assets/textformat/chinese.utf16be.lf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..b2cd81d9304761e273b6b44a4ac673b16437bf86 GIT binary patch literal 3270 zcmZ8k4NM#789uBsVslQQ>#~%!qGVE_36yKvv8-CFge-x?&3CpBgRh3W!{9THA*msE z7jO(VI1boOI7%>tbm=6tl){EW)~YIDOS?8IrLDS3P1Yz=64sGM?po52wo#?__I~zI zrwL)KTuD3>pG(|yTSmt1QvEkW z~U3Y<9_$$!Ux#mq~xYtgyYtw$!d&0$X6CjwN%IEvsZ`(`Y1@6&|A>+Flg>>4RY zEZ@3jow>+_3{Zp3nQPbCb;xuwPtj|n_&qXqFYI&&ghkaP^ zz+c(UuJ&sFRgE0n(AyAL6{tfdv7E{n`Ak}OqPFW;@b@@c3fcEs%e?Qq*x*@Y!cWG3 z$8ECwrmsKxW0(XyUw1pSjOHQpf3cu4nB7wTe$jj{GIj0M$iU71TZo84)o8J5x44ge z7-bU%G(+id=UscNzeUF2ca}XG=_?x=9~wg??qaB0@hX7hj7Elwk&#)dzMjI#7))qn zC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As`>U1-eY*v@G<&)WWqxEGi?$o zaZmLw+24!3OzAKh0Y8FCLR@42jDxXUG%xUP0=sx&xj$&3(9G}-maGQYI>1nPHkOQEA`I!g zLLuYpG~$`Hya9;DxJ~FX?@*c1k2KOg3SP5N{RTXL!KKG@+OwcmAH5316&!-#V5>8j2Pfuq>f?4Y>%T7jodfs`e;x;_#X3j zG|6>w2k@?t^`+~}PcrIszKK>t?QPU%|SVCG!-8M$?8H2PjcR0jz_ZWEA=ZyOQ14fkF)QkCd;bE=9|M;Ef~fCX2>AJgx>>zH z;>GVBXgh1{xzSQ?K3a2y(&3(!MZ8n_Us}pi{Mzn8>ApQp=yamaEeQ`=F2a^5KqXQ> zew%R~Ouaw-lkM>|X`~~!DwjU*e1I01a~Ns-i`9Ezh z&m>v@u}6aK0eA<2zW8nh*9Hj9vxUw-)Ap8&mX~P3@)9uZuw~K@`w%OhHL4+3aV!bA zETXWdskst60`_IrU%f%g$F+`>q_x+OAAJxRESrNE%C+rUS)3^ha;m}JXyF1`ImZ4u@{*s75u zt3VM)k8eT-=Rtcdu%L{n2aa}wl8F8&eO_4Uq_{dB zmakxB)zjc)hLCiWUjo%z7@DpVbt5zN3y3p5b1+Ez0rQvGR6DW-DSSZ>GSMyyzL!7v}1Kt?u zZhSqx*MR4M{t7CzfbJswnaTHd^lx6Tc(1psN fnUS}=WdRcFq4OHf?HFdOX)A0|YY+SfKp6f5#(62v literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/chinese.utf16le.crlf.bom.txt b/bin/unit_tests/assets/textformat/chinese.utf16le.crlf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..eb2201629b63875ee032feac7ada984e21230461 GIT binary patch literal 3366 zcmZ8k4@?`^89%Ht;&4tvmSvQ+qGVDa36yKvv8-CFge-yJ=AG@s*jF2$F}^d-K~h6} z7jO)=aa{Z-!IXdr>C#DPDS-`ztW_1lmUV4ZLR)o}nygW#q*+HAxob%wZKF!$92T1_Y|0Cv`sv zv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.txt b/bin/unit_tests/assets/textformat/chinese.utf16le.lf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..2918071f29e5b9273e0a7e6eb0d293aa64c1e9ce GIT binary patch literal 3270 zcmZ8j4@?`^89%HtVslPH)@78nqGVDa36yKvv8-CFge-yJ=AG@s*jJl7V|-^ELsCP0 z7jPVGMi%eE4J?O7f(#L&&og%Lz0!bdDhv4M7Hr^*EvqjmJslwA1O)P)l;faA7>3BG6qC zpSeT0Et1s#=cuJr)K2=YSb?@W3gad^fk@Epc3zD2dR9=f5p!+l5bwv>QK9MsDss8@pA%EfwAT&!dXtoB*W9a8p7d8 z#4HI?iAvuZW`qKV4rw4e6J6j?SyUDsDmtN-N#%P{i{`@z`76C&^8Tb;rN)>EZT95Z78`^7R>z$r z;DqiZH?VFyspO+>M?>dpfaLmt=H3;7#()l0i#gP1!-YQE@uS_p58~4>vhN0~+TZiA z!Wme>Z~iX1iTjPAFZScO4&nC~8<#?Juy+}Y9IB2f_KEw}=yhmMH>unT-0mY#A#`OP z)z$A6H?a9gLrg=(xbi*S-!^E`cfs8TQmOKe4UP_0pmJ9xBzt6!+BFTmD355-0`vp# z)}o;x37wD=lHqf}sK!VjAKgt$hK1G(do={^^5r3%jSl^&=Sla!BMt4Oa&y1*tou-$ zBNfRoHryhvaQ%cOm7_yTu0L{9VNyATHoDZV*Yw$5@Ud^2cKXLGxj}qZfkQ)VbRB?R z=A)hd67O?>iHY9au0>_O8vV(*!9_r2vT*;tZw&-`)w4rLpeT)NJ#3#wI`mlZ3+ZD0 zGWV8spdnuG)Ka9f9aV~1&Obdo6=?Rn+>I;1O6XuPSC{u^ch?x_Wvq*G*Q%x$na%Bm z@!Nfvabtt;Fk^!kpf?&~J>t@3_O8aBfz$d)tbA=17t6X1Jcc!WS!7 zr3!AL$LFsOGz*VgprcfF-x>Q0rtM65n5_46PwXX?e=&2Qgmvr<$=I{n^xu6?C5U)# zV5s+?>5}igep0yuSzfT;@l82e?DF7$_nEC`YrY(%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Ry4qb&wQbU{qy}IL*of{7h9MYlp0jsI-`T?wU9iq%xbz!aPkh=dI6SGbn zRqbhWXS=(M*b64Ci%=(K9c{vs14+RgD`VA;rVepmqndje&oX%R31<}HCzR1do1(?a z&s-c@DLw&jchh)1d#`1AvW$wIz8`X(=%Meqdy>aoS}6vk2y{tHjmOOq>~}-GQ8Wtb kAQck)jsfp_YZ#ap#Co{ig<}so>RA(gRxr`pFlNAi0M^wj%m4rY literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/chinese.utf16le.lf.nobom.txt b/bin/unit_tests/assets/textformat/chinese.utf16le.lf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..85927b1c6d0e53f011da6efb4bbba8f963b226e4 GIT binary patch literal 3268 zcmZ8j4@?`^89%HtVslPH)@78nqGVDa36yKvv8-CFge-yJ=AG@s*jJl7V|-^ELsCP0 z7jPVGxy{%!K+;k@9iF_oD1U zDFW^B;gfYJ$&<x-34XqLhG%pqJ& z@<8$csSqfEO1!Hbr1BmA6+g#FzIkD*L+#R`4pwi)&j~~Y#+suDXE_~{3{UrJ2!|&T zvm{6*Dt&915eghSq=D>Abb&)S9e0v| z6S|Y!z`E_El8?F_4V|w6lIsVWdshS+13FYK=1`vv7y4|+k9Pk)h)=`Fz8kD+f6v1T zXJ7@t`McyM?l*?M*pK5ngx_CmTnf#>-eoLus5++DC+=IL*P%V#q;e~8yN^JH(3N>q zSHD->z~&t%J+1C+n`0?1$P@rrOG=tI67E?%3Ya|?2$cc*EIB^JfcMl&=0&@ zi-v+EbV5!@hR*?`8Y6*xbT=&-7FsXt)eyMLmxpjRI`pHSC*A*!G_;e-&Hd7|?n7~o zR3yXLaErLY^%IsV**N#zvU=u*30(`S3Z$G&OW=^wM?2Ju-14h^xJ^- z+*{UxhIqYGOOeWUR4HaT|Mc)wpxN_sH?9CHp@YF(UEZJFU1OY=u`bG8tD0V9Hn$hX zZ}(xwjSarTj169Z-e`#Rh)b8**PFw&<0%QUY= zSD0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;QojCctGhi4vt1;mAu`PKt!mdz zYnd7Iz!W8w6~k%%h+)$)4Rp$EwGvgp0#fOwLGdUNJ5SHcm0}I+Za*s=2i{b9lRWMo zWgJbB;z}_(bQLB^4RH$e>W)u#Zag?}NQd4Btfs>22e8(4h%#r@g|((b>i%;~%sO#Y zwWrOU?d~#SFPN|{LYddAYVKt`%iz@~oKb|IP(~ANiWVzB zb8%>;_yoM&P2=_Ky_V(4GAefZe#mvAhrZ|TNgi`)r5KPR&?PN39ydp@-wpLf(I}{c jR7mhU2E6O7VPIYm>*0DAjy>q8XHE23!9;7rm;wI*aI7iM literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/chinese.utf8.crlf.bom.txt b/bin/unit_tests/assets/textformat/chinese.utf8.crlf.bom.txt new file mode 100644 index 000000000..1facdc4f3 --- /dev/null +++ b/bin/unit_tests/assets/textformat/chinese.utf8.crlf.bom.txt @@ -0,0 +1,48 @@ +第一回 甄士隱夢幻識通靈 賈雨村風塵懷閨秀 + + 【甲戌、庚、蒙批:此開卷第一回也。作者自云:因曾歷過一番夢幻之後,故將真事隱去, +而借通靈之說,撰此《石頭記》一書也。故曰「甄士隱夢幻識通靈」。但書中所記何事,又因何 +而撰是書哉?自又云:今風塵碌碌,一事無成,忽念及當日所有之女子,一一細推了去,覺其行 +止見識,皆出於我之上。何我堂堂之鬚眉,曾不若彼裙釵哉!實愧則有餘,悔又無益之大無可奈 +何之日也!當此時,則自欲將已往所賴,上賴天恩,下承祖德,錦衣紈絝之時、飫甘饜美肥之日, +背父母教育之恩,負師兄規訓之德,已至今日一事無成、半生潦倒之罪,編述一記,以告普天下 +人。我之罪固不能免,然閨閣中本自歷歷有人,萬不可因我之不肖,自護其短,則一併使其泯滅 +也。雖今日之茆椽蓬牖,瓦灶繩床,其風晨月夕,階柳庭花,亦未有傷於我之襟懷筆墨者。雖我 +未學,下筆無文,何爲不用假語村言,敷演出一段故事來,以悅人之耳目哉。故曰「風塵懷閨 +秀」,乃是第一回題綱正義也。開卷即曰「風塵懷閨秀」,則知作者本意原爲記述當日閨友閨情, +並非怨世駡時之書矣。雖一時有涉於世態,然亦不得不叙者,但非其本旨耳,閱者切記之。詩曰: + + 【浮生著甚苦奔忙?盛席華筵終散場。】 + 【悲喜千般同幻渺,古今一夢盡荒唐。】 + 【謾言紅袖啼痕重,更有情痴抱恨長。】 + 【字字看來皆是血,十年辛苦不尋常!】 + + 【楊藏、庚辰、夢覺、舒序批:此回中凡用夢用幻等字,是提醒閱者眼目,亦是此書立意本 +旨。】〈按:此兩段回前批语常被混入正文。故雖為批語,仍錄於此。〉 + + 列位看官,你道此書從何而來?說起根由雖近荒唐,細諳則深有趣味。待在下將此來歷注明, +方使聞者了然不惑。 + + 原來,當年女媧氏煉石補天之時,於大荒山無稽崖煉成高經[1]十二丈,方經[2]二十四丈頑 +石三萬六千五百零一塊。媧皇氏只用了三萬六千五百塊,只單單剩了一塊未用,便棄在此山青埂 +峰下。誰知此石自經煅煉[3]之後,靈性已通,因見眾石俱得補天,獨自己無材不堪入選,遂自 +怨自嗟,日夜悲號[4]慚愧。 + + 一日,正當嗟悼之餘,俄見一僧一道遠遠而來,生得骨骼不凡,豐神迥异,說說笑笑來至峰 +下,坐於石邊高談快論。先是說些雲山霧海神僊玄幻之事,後便說到紅塵中榮華富貴。此石聽了, +不覺打動凡心,也想要到人間去享一享這榮華富貴,但自恨粗蠢,不得已,便口吐人言,向那僧 +道說道:「大師,弟子蠢物,不能見禮了。適聞二位談那人世間榮耀繁華,心切慕之。弟子質雖 +粗蠢,性卻稍通,況見二師仙形道體,定非凡品,必有補天濟世之材,利物濟人之德。如蒙發一 +點慈心,攜帶弟子得入紅塵,在那富貴場中,溫柔鄉里受享幾年,自當永佩洪恩,萬劫不忘也。」 +二仙師聽畢,齊憨笑道:「善哉,善哉!那紅塵中有卻有些樂事,但不能永遠依恃。況又有美中 +不足、好事多魔八個字緊相連屬,瞬息間則又樂极悲生,人非物換,究竟是到頭一夢,萬境歸空, +倒不如不去的好。」這石凡心已熾,那[5]裡聽得進這話去,乃复苦求再四。二仙知不可強制, +乃歎道:「此亦靜極思動,無中生有之數也。既如此,我們便攜你去受享受享,只是到不得意時, +切莫後悔。」石道:「自然,自然。」那僧又道:「若說你性靈,卻又如此質蠢,并更無奇貴之 +處。如此也只好踮腳而已。也罷,我如今大施佛法助你助,待劫終之日,复還本質,以了此案。 +你道好否?」石頭聽了,感謝不盡。那僧便念咒書符,大展幻術,將一塊大石登時變成一塊鮮明 +瑩洁的美玉,且又縮成扇墜大小的可佩可拿。那僧托於掌上,笑道:「形体倒也是個寶物了!還 +只沒有實在的好處,須得再鐫上數字[6],使人一見便知是奇物方妙。然後攜你到那昌明隆盛之 +邦,詩禮簪纓之族,花錦繁華之地,溫柔富貴之鄉去安身樂業。」石頭聽了,喜不能禁,乃問: +「不知弟子那幾件奇處,又不知携了弟子到何處?望乞明示,使弟子不惑。」那僧笑道:「你且 +莫問,日後自然明白的。」說著,便袖了那石,同那道人飄然而去,竟不知投奔何方何舍。 diff --git a/bin/unit_tests/assets/textformat/chinese.utf8.crlf.nobom.txt b/bin/unit_tests/assets/textformat/chinese.utf8.crlf.nobom.txt new file mode 100644 index 000000000..45eaf879e --- /dev/null +++ b/bin/unit_tests/assets/textformat/chinese.utf8.crlf.nobom.txt @@ -0,0 +1,48 @@ +第一回 甄士隱夢幻識通靈 賈雨村風塵懷閨秀 + + 【甲戌、庚、蒙批:此開卷第一回也。作者自云:因曾歷過一番夢幻之後,故將真事隱去, +而借通靈之說,撰此《石頭記》一書也。故曰「甄士隱夢幻識通靈」。但書中所記何事,又因何 +而撰是書哉?自又云:今風塵碌碌,一事無成,忽念及當日所有之女子,一一細推了去,覺其行 +止見識,皆出於我之上。何我堂堂之鬚眉,曾不若彼裙釵哉!實愧則有餘,悔又無益之大無可奈 +何之日也!當此時,則自欲將已往所賴,上賴天恩,下承祖德,錦衣紈絝之時、飫甘饜美肥之日, +背父母教育之恩,負師兄規訓之德,已至今日一事無成、半生潦倒之罪,編述一記,以告普天下 +人。我之罪固不能免,然閨閣中本自歷歷有人,萬不可因我之不肖,自護其短,則一併使其泯滅 +也。雖今日之茆椽蓬牖,瓦灶繩床,其風晨月夕,階柳庭花,亦未有傷於我之襟懷筆墨者。雖我 +未學,下筆無文,何爲不用假語村言,敷演出一段故事來,以悅人之耳目哉。故曰「風塵懷閨 +秀」,乃是第一回題綱正義也。開卷即曰「風塵懷閨秀」,則知作者本意原爲記述當日閨友閨情, +並非怨世駡時之書矣。雖一時有涉於世態,然亦不得不叙者,但非其本旨耳,閱者切記之。詩曰: + + 【浮生著甚苦奔忙?盛席華筵終散場。】 + 【悲喜千般同幻渺,古今一夢盡荒唐。】 + 【謾言紅袖啼痕重,更有情痴抱恨長。】 + 【字字看來皆是血,十年辛苦不尋常!】 + + 【楊藏、庚辰、夢覺、舒序批:此回中凡用夢用幻等字,是提醒閱者眼目,亦是此書立意本 +旨。】〈按:此兩段回前批语常被混入正文。故雖為批語,仍錄於此。〉 + + 列位看官,你道此書從何而來?說起根由雖近荒唐,細諳則深有趣味。待在下將此來歷注明, +方使聞者了然不惑。 + + 原來,當年女媧氏煉石補天之時,於大荒山無稽崖煉成高經[1]十二丈,方經[2]二十四丈頑 +石三萬六千五百零一塊。媧皇氏只用了三萬六千五百塊,只單單剩了一塊未用,便棄在此山青埂 +峰下。誰知此石自經煅煉[3]之後,靈性已通,因見眾石俱得補天,獨自己無材不堪入選,遂自 +怨自嗟,日夜悲號[4]慚愧。 + + 一日,正當嗟悼之餘,俄見一僧一道遠遠而來,生得骨骼不凡,豐神迥异,說說笑笑來至峰 +下,坐於石邊高談快論。先是說些雲山霧海神僊玄幻之事,後便說到紅塵中榮華富貴。此石聽了, +不覺打動凡心,也想要到人間去享一享這榮華富貴,但自恨粗蠢,不得已,便口吐人言,向那僧 +道說道:「大師,弟子蠢物,不能見禮了。適聞二位談那人世間榮耀繁華,心切慕之。弟子質雖 +粗蠢,性卻稍通,況見二師仙形道體,定非凡品,必有補天濟世之材,利物濟人之德。如蒙發一 +點慈心,攜帶弟子得入紅塵,在那富貴場中,溫柔鄉里受享幾年,自當永佩洪恩,萬劫不忘也。」 +二仙師聽畢,齊憨笑道:「善哉,善哉!那紅塵中有卻有些樂事,但不能永遠依恃。況又有美中 +不足、好事多魔八個字緊相連屬,瞬息間則又樂极悲生,人非物換,究竟是到頭一夢,萬境歸空, +倒不如不去的好。」這石凡心已熾,那[5]裡聽得進這話去,乃复苦求再四。二仙知不可強制, +乃歎道:「此亦靜極思動,無中生有之數也。既如此,我們便攜你去受享受享,只是到不得意時, +切莫後悔。」石道:「自然,自然。」那僧又道:「若說你性靈,卻又如此質蠢,并更無奇貴之 +處。如此也只好踮腳而已。也罷,我如今大施佛法助你助,待劫終之日,复還本質,以了此案。 +你道好否?」石頭聽了,感謝不盡。那僧便念咒書符,大展幻術,將一塊大石登時變成一塊鮮明 +瑩洁的美玉,且又縮成扇墜大小的可佩可拿。那僧托於掌上,笑道:「形体倒也是個寶物了!還 +只沒有實在的好處,須得再鐫上數字[6],使人一見便知是奇物方妙。然後攜你到那昌明隆盛之 +邦,詩禮簪纓之族,花錦繁華之地,溫柔富貴之鄉去安身樂業。」石頭聽了,喜不能禁,乃問: +「不知弟子那幾件奇處,又不知携了弟子到何處?望乞明示,使弟子不惑。」那僧笑道:「你且 +莫問,日後自然明白的。」說著,便袖了那石,同那道人飄然而去,竟不知投奔何方何舍。 diff --git a/bin/unit_tests/assets/textformat/chinese.utf8.lf.bom.txt b/bin/unit_tests/assets/textformat/chinese.utf8.lf.bom.txt new file mode 100644 index 000000000..0c8f72711 --- /dev/null +++ b/bin/unit_tests/assets/textformat/chinese.utf8.lf.bom.txt @@ -0,0 +1,48 @@ +第一回 甄士隱夢幻識通靈 賈雨村風塵懷閨秀 + + 【甲戌、庚、蒙批:此開卷第一回也。作者自云:因曾歷過一番夢幻之後,故將真事隱去, +而借通靈之說,撰此《石頭記》一書也。故曰「甄士隱夢幻識通靈」。但書中所記何事,又因何 +而撰是書哉?自又云:今風塵碌碌,一事無成,忽念及當日所有之女子,一一細推了去,覺其行 +止見識,皆出於我之上。何我堂堂之鬚眉,曾不若彼裙釵哉!實愧則有餘,悔又無益之大無可奈 +何之日也!當此時,則自欲將已往所賴,上賴天恩,下承祖德,錦衣紈絝之時、飫甘饜美肥之日, +背父母教育之恩,負師兄規訓之德,已至今日一事無成、半生潦倒之罪,編述一記,以告普天下 +人。我之罪固不能免,然閨閣中本自歷歷有人,萬不可因我之不肖,自護其短,則一併使其泯滅 +也。雖今日之茆椽蓬牖,瓦灶繩床,其風晨月夕,階柳庭花,亦未有傷於我之襟懷筆墨者。雖我 +未學,下筆無文,何爲不用假語村言,敷演出一段故事來,以悅人之耳目哉。故曰「風塵懷閨 +秀」,乃是第一回題綱正義也。開卷即曰「風塵懷閨秀」,則知作者本意原爲記述當日閨友閨情, +並非怨世駡時之書矣。雖一時有涉於世態,然亦不得不叙者,但非其本旨耳,閱者切記之。詩曰: + + 【浮生著甚苦奔忙?盛席華筵終散場。】 + 【悲喜千般同幻渺,古今一夢盡荒唐。】 + 【謾言紅袖啼痕重,更有情痴抱恨長。】 + 【字字看來皆是血,十年辛苦不尋常!】 + + 【楊藏、庚辰、夢覺、舒序批:此回中凡用夢用幻等字,是提醒閱者眼目,亦是此書立意本 +旨。】〈按:此兩段回前批语常被混入正文。故雖為批語,仍錄於此。〉 + + 列位看官,你道此書從何而來?說起根由雖近荒唐,細諳則深有趣味。待在下將此來歷注明, +方使聞者了然不惑。 + + 原來,當年女媧氏煉石補天之時,於大荒山無稽崖煉成高經[1]十二丈,方經[2]二十四丈頑 +石三萬六千五百零一塊。媧皇氏只用了三萬六千五百塊,只單單剩了一塊未用,便棄在此山青埂 +峰下。誰知此石自經煅煉[3]之後,靈性已通,因見眾石俱得補天,獨自己無材不堪入選,遂自 +怨自嗟,日夜悲號[4]慚愧。 + + 一日,正當嗟悼之餘,俄見一僧一道遠遠而來,生得骨骼不凡,豐神迥异,說說笑笑來至峰 +下,坐於石邊高談快論。先是說些雲山霧海神僊玄幻之事,後便說到紅塵中榮華富貴。此石聽了, +不覺打動凡心,也想要到人間去享一享這榮華富貴,但自恨粗蠢,不得已,便口吐人言,向那僧 +道說道:「大師,弟子蠢物,不能見禮了。適聞二位談那人世間榮耀繁華,心切慕之。弟子質雖 +粗蠢,性卻稍通,況見二師仙形道體,定非凡品,必有補天濟世之材,利物濟人之德。如蒙發一 +點慈心,攜帶弟子得入紅塵,在那富貴場中,溫柔鄉里受享幾年,自當永佩洪恩,萬劫不忘也。」 +二仙師聽畢,齊憨笑道:「善哉,善哉!那紅塵中有卻有些樂事,但不能永遠依恃。況又有美中 +不足、好事多魔八個字緊相連屬,瞬息間則又樂极悲生,人非物換,究竟是到頭一夢,萬境歸空, +倒不如不去的好。」這石凡心已熾,那[5]裡聽得進這話去,乃复苦求再四。二仙知不可強制, +乃歎道:「此亦靜極思動,無中生有之數也。既如此,我們便攜你去受享受享,只是到不得意時, +切莫後悔。」石道:「自然,自然。」那僧又道:「若說你性靈,卻又如此質蠢,并更無奇貴之 +處。如此也只好踮腳而已。也罷,我如今大施佛法助你助,待劫終之日,复還本質,以了此案。 +你道好否?」石頭聽了,感謝不盡。那僧便念咒書符,大展幻術,將一塊大石登時變成一塊鮮明 +瑩洁的美玉,且又縮成扇墜大小的可佩可拿。那僧托於掌上,笑道:「形体倒也是個寶物了!還 +只沒有實在的好處,須得再鐫上數字[6],使人一見便知是奇物方妙。然後攜你到那昌明隆盛之 +邦,詩禮簪纓之族,花錦繁華之地,溫柔富貴之鄉去安身樂業。」石頭聽了,喜不能禁,乃問: +「不知弟子那幾件奇處,又不知携了弟子到何處?望乞明示,使弟子不惑。」那僧笑道:「你且 +莫問,日後自然明白的。」說著,便袖了那石,同那道人飄然而去,竟不知投奔何方何舍。 diff --git a/bin/unit_tests/assets/textformat/chinese.utf8.lf.nobom.txt b/bin/unit_tests/assets/textformat/chinese.utf8.lf.nobom.txt new file mode 100644 index 000000000..1da0a5424 --- /dev/null +++ b/bin/unit_tests/assets/textformat/chinese.utf8.lf.nobom.txt @@ -0,0 +1,48 @@ +第一回 甄士隱夢幻識通靈 賈雨村風塵懷閨秀 + + 【甲戌、庚、蒙批:此開卷第一回也。作者自云:因曾歷過一番夢幻之後,故將真事隱去, +而借通靈之說,撰此《石頭記》一書也。故曰「甄士隱夢幻識通靈」。但書中所記何事,又因何 +而撰是書哉?自又云:今風塵碌碌,一事無成,忽念及當日所有之女子,一一細推了去,覺其行 +止見識,皆出於我之上。何我堂堂之鬚眉,曾不若彼裙釵哉!實愧則有餘,悔又無益之大無可奈 +何之日也!當此時,則自欲將已往所賴,上賴天恩,下承祖德,錦衣紈絝之時、飫甘饜美肥之日, +背父母教育之恩,負師兄規訓之德,已至今日一事無成、半生潦倒之罪,編述一記,以告普天下 +人。我之罪固不能免,然閨閣中本自歷歷有人,萬不可因我之不肖,自護其短,則一併使其泯滅 +也。雖今日之茆椽蓬牖,瓦灶繩床,其風晨月夕,階柳庭花,亦未有傷於我之襟懷筆墨者。雖我 +未學,下筆無文,何爲不用假語村言,敷演出一段故事來,以悅人之耳目哉。故曰「風塵懷閨 +秀」,乃是第一回題綱正義也。開卷即曰「風塵懷閨秀」,則知作者本意原爲記述當日閨友閨情, +並非怨世駡時之書矣。雖一時有涉於世態,然亦不得不叙者,但非其本旨耳,閱者切記之。詩曰: + + 【浮生著甚苦奔忙?盛席華筵終散場。】 + 【悲喜千般同幻渺,古今一夢盡荒唐。】 + 【謾言紅袖啼痕重,更有情痴抱恨長。】 + 【字字看來皆是血,十年辛苦不尋常!】 + + 【楊藏、庚辰、夢覺、舒序批:此回中凡用夢用幻等字,是提醒閱者眼目,亦是此書立意本 +旨。】〈按:此兩段回前批语常被混入正文。故雖為批語,仍錄於此。〉 + + 列位看官,你道此書從何而來?說起根由雖近荒唐,細諳則深有趣味。待在下將此來歷注明, +方使聞者了然不惑。 + + 原來,當年女媧氏煉石補天之時,於大荒山無稽崖煉成高經[1]十二丈,方經[2]二十四丈頑 +石三萬六千五百零一塊。媧皇氏只用了三萬六千五百塊,只單單剩了一塊未用,便棄在此山青埂 +峰下。誰知此石自經煅煉[3]之後,靈性已通,因見眾石俱得補天,獨自己無材不堪入選,遂自 +怨自嗟,日夜悲號[4]慚愧。 + + 一日,正當嗟悼之餘,俄見一僧一道遠遠而來,生得骨骼不凡,豐神迥异,說說笑笑來至峰 +下,坐於石邊高談快論。先是說些雲山霧海神僊玄幻之事,後便說到紅塵中榮華富貴。此石聽了, +不覺打動凡心,也想要到人間去享一享這榮華富貴,但自恨粗蠢,不得已,便口吐人言,向那僧 +道說道:「大師,弟子蠢物,不能見禮了。適聞二位談那人世間榮耀繁華,心切慕之。弟子質雖 +粗蠢,性卻稍通,況見二師仙形道體,定非凡品,必有補天濟世之材,利物濟人之德。如蒙發一 +點慈心,攜帶弟子得入紅塵,在那富貴場中,溫柔鄉里受享幾年,自當永佩洪恩,萬劫不忘也。」 +二仙師聽畢,齊憨笑道:「善哉,善哉!那紅塵中有卻有些樂事,但不能永遠依恃。況又有美中 +不足、好事多魔八個字緊相連屬,瞬息間則又樂极悲生,人非物換,究竟是到頭一夢,萬境歸空, +倒不如不去的好。」這石凡心已熾,那[5]裡聽得進這話去,乃复苦求再四。二仙知不可強制, +乃歎道:「此亦靜極思動,無中生有之數也。既如此,我們便攜你去受享受享,只是到不得意時, +切莫後悔。」石道:「自然,自然。」那僧又道:「若說你性靈,卻又如此質蠢,并更無奇貴之 +處。如此也只好踮腳而已。也罷,我如今大施佛法助你助,待劫終之日,复還本質,以了此案。 +你道好否?」石頭聽了,感謝不盡。那僧便念咒書符,大展幻術,將一塊大石登時變成一塊鮮明 +瑩洁的美玉,且又縮成扇墜大小的可佩可拿。那僧托於掌上,笑道:「形体倒也是個寶物了!還 +只沒有實在的好處,須得再鐫上數字[6],使人一見便知是奇物方妙。然後攜你到那昌明隆盛之 +邦,詩禮簪纓之族,花錦繁華之地,溫柔富貴之鄉去安身樂業。」石頭聽了,喜不能禁,乃問: +「不知弟子那幾件奇處,又不知携了弟子到何處?望乞明示,使弟子不惑。」那僧笑道:「你且 +莫問,日後自然明白的。」說著,便袖了那石,同那道人飄然而去,竟不知投奔何方何舍。 diff --git a/bin/unit_tests/assets/textformat/english.utf16be.crlf.bom.txt b/bin/unit_tests/assets/textformat/english.utf16be.crlf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..d35d6189d8669bbd6f30ea9fcde2ccbf6abbdce5 GIT binary patch literal 7982 zcmbW+K~o&b5e48rJHr2g+u9MvKft%u+F^00kd|PL})SXn9!9mP37>)xY!QZn;`6myhGk#d5pcEW3KXtGAE! zd9{45-`_7^#<-j1clFm`t`7K`84CIp552` zeOdYa^6TYS%e(R3=-aW{+vQU|VclvU>pO2R#y8%4UcN5B)Xz=X;0GVgonu9{A5n@o zG4T4Ro_?sG+u?%<%-WaziyHlaUyOkyv*1o)5m?mOn?!--ZqT+zlWLp>DNGKvGLP7vmOs~b@jdqd zvU5~ol)rsNX+4GI$6EWQey|Y34rO;=e_JP5oY!ZNhp)_>*UwqmH^14}OuZX#j>^he z**MgS_!?`U#|%ER6zlwBg-_u-te|7eml`Ez5n>HK*nKuAYkor#_5z z_QMNLQ;$~44B3ae`fPq%>ksw3{b?JGTM&b?NP?xzSTh{44(1%!`d5Q%5S)y#s#wqJ z9q-QvR&;|m@jVCyk-6XGM}-%;>A-Yc}A1ef7f~M2%_xW zB3kq^VqeNXY-pxTf7Bd2KaEW8#tL)^R#EE25(}b>2F{$l9+=9+yPCHz{=oe7sg6Dj zR#~~@f=ZN+jTr&Vzg8`+(cCg7s{2ru<-hHTCA%1|e;!`*rZa+_Y8BtV)$brrSB&~v z9$eHn>`VRdEqci#qZ?rsuSW(`Ny!+b>_WHYk$Uh>Hu0)i*)dbcn|is1#^0xwX&{Nq2G(`Wfik`p4EOI z)tq}#&lG_j<$2xmO04|sYLm(2p>;Ld4|#c3BVv~|^C*lxh@EsZvL(A#-`4iNa7-mr z7aqybQ9Y$?o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awn%Vg$UsNr0at>Zh_>KjlP)} Hr`-Pld54BK literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/english.utf16be.crlf.nobom.txt b/bin/unit_tests/assets/textformat/english.utf16be.crlf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..554fe302bd96d7e4d3e212f4493c9857129ef2b0 GIT binary patch literal 7980 zcmbW+K~o&b5e48rJHr2g+u9M9e}HeRwZr1z)y4{2vB!ZKAuJ>?1CrTa@BHeKu5Qf9 zL5LZ;tFkg*zI>HcT27by7u9tm1-`Cs6`n+1c z)bHyOh z3{>0RN&R&_JQB;k-t)otoAT#m`Ny!qpSxk@Zv*9HJ%!1!R^}1g)AE=4F23g;Kz5Ew zjPiG=h`cjL?vEp`yYj2OxU5l-zaKvAD+XCPDGx>TxxQt-3`68{c(p4Fyp&-`@iMvi z{FGt7pVd=Xeyp{x>jw)l>{xaW^|y6`#d&=OdHBlAdHw9lzWL3*X6oH|b5d4zW#d>Y z;%lsZ88i6IQmpfj6+VUUu!4>;w>3)4BE&xE;fUPbJ$VrRgjbzOImOf4G4k<=xw~QW zysYtowcTJ!)=Fle6^;d$)WqrVa$j$5%kIVSh<_OId8`7v=Cpj@)pL>H)Q7RoVR+$b z>d{J>A^T8QpUrP;{i&X}KW(FN3t~_fNwAa|Ylb7%!JJpM{?*_b1Scb`D%M@SxJEN8JU3sl0 zF(~-AQo{FSU~4Ya9&2nE-*{1l5B1LMzdThMj$!3o2NzOPLGZq2i9puE%wF?YPib-L z?%VLUl@zXxPVA??%}IT?S8N;xe^l(n6YKF^<}g@tL6p5)M2lWV z?6&;FhGxq2N6o?W^T_0WtU#Aw6{Suru^_r=;LO>ZfvHTquX%^!56sV=>gdB@m6ba# zs6_eLm=VDIp=xQ3=9V#0-EU=C{@b2dvWwyRm*F*UIwRPrR`LC7{SNYU#i)n!;G(`^ zU+RZ%(Mui~-3YVzX=E^!l#D^jE_72KsR!?56R(<;9W!;juJ>!6WtZ)Yi0W}5__kJ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`WUk8o4yP{60 zqn4{wJ$s0U`C$*A2QO=oO8xIsM?s}|zHv@ZLyt~Rej)vQUnrf8Jc7eiUOF6* zF{fSOctuYQYogjdRl+XTMiZ&*gYx0Nrl}*WJ#-H+63r$HpvH6R5$)masWo?a6Ngo2n%nd-{N?UwWT=0% zn4XU@yy<0&h|ywO<*(Hb&E^Stg2DDDXOrJpTpo33Xcw-NCE_xB>5JIcd0}6W1%0E7 z_vf1HJ}91JJLdqAebl!^;`e8<*v{T}vS~GD_t&bBH=lk}mVJg@c~inX#b*#0_Q4Hh z@}J%t%e+~|M`M|+^8Tv5-+OtNa+Tw6_6+M>pVaEM6w*8!_bDH0H&*&oK#5V&E!;KallDl@*9kOg?)ICzW2X=)|p z4u&^qC=q!F?D(xlyT|%}d)#p_7oL-STTT5k(xM=r!~njIf|>?N)H|n;-=>5SoR1*P z-D7-TM)6QM(03P#pZ17ny*|3GU8sqJ;ExQ+=Xy?4&13%BW zsZkJcEx3PiJm`4d?X>;}O>VQ%3otN}KHZ3s9oCvhPKbjnfey8S&!_tSB$V(1miyL9 zCh?3Fcw&3KtWm+_4b*}*RRVH(k2q8wG?Y77-lON_wC#9E9B3e!r8jowKx2$1w;|sW zeGd9f>{!Xoc{~SopL$qEQ+$TvwZQ(VUBq literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/english.utf16be.lf.nobom.txt b/bin/unit_tests/assets/textformat/english.utf16be.lf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..82bc2af33e84f996646b258d0cd3cefbbb14e96a GIT binary patch literal 7860 zcmbW6UsD@L5XA3UpF(d=szN?M-fSloc!+TsB`!beA3{MOq7x?g)2Dya>g*liDMcBi zz1`WFo}S*>b9d1lyJ`2-&AVQI=lZwk4&AofbT{>6+3mYsx6=4ZPoMR7+uiH;+wP&} z?YbZIZLTrq9JOk#ze}yz>-TM0ebU&W#(T}c`fXX+oK|c#cGUB=to+zby3h5Lx%=Ad zs=Lz&w%O}OpYe5BpYY|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english.utf16le.crlf.nobom.txt b/bin/unit_tests/assets/textformat/english.utf16le.crlf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..64092e18e9e16278a5adb20af8fde5539246a5f4 GIT binary patch literal 7980 zcmbW+K~o&b5e48rJHr2g+u9M9e}HeRwZr1z)y4{2vB!ZKAuJ>?1CrTa@BHeKu5Qf9 zL5LZ;tFkg*zI>HcI$iFUljYm8TaNX)tAFRq-Ey^DE+5C6i{)myUiS5TUvD4l^J@80 zzrSB@$GGd|5B1lso*8prvkvunQFCtU_ord?TRpoQ&yO{N^-sgf<)vhe?QidVL%jDwo zQ-=9|R!?F1vDUt>A1uVMW7$2_-_{8h=k*!n;VU!e^|LGc<~RGAsdwYeNm<#Ijbp8d zud()J%-}OivCcnM_!Pdw3OdHz)+jNH5c{BqBXW25_c6BHovX)r+VK0w2j6sh(TE-!BS?d8ID*7b6(Z@SA%O1oQ$xlSaFR!hLv+2Tu4m?!TXve0$B?)d(C4#rNybc zZ^PeKQn)rcv7h=jC-vQ4v2hsuQLz_KtjBkm&)8n^;wh6nqe<$&>%4aaQTA>TEqWQT z+wu<^nkmyCH3!enBa{2F0$qYtlsd7*g6N`wGiPrGrZVxq<{gSZFh6^$qYr~sR_?f< z66IrKMga4Ns--oWTgF6nzm;YAZ+l|NE{5x0hS$95j9{l)#rLoEJIK=&qaMnGi~5Fr zsUN;YFL`8iBh2Ebk-=0_G6pHT&`o)y9=wxHylPf<%+&F^-miIgxg+ggpn z(B2L#lDIlazWS=Xx2@5T1AirG7NwckfI=U&t^ zMPNsHUbnmwD?hv1WHNbZU5)lbUY^y6*k#Q;3S$pqC*6!}$*$G6wS6cYQ_0kYM>2F$ zPib3cn_BYBYGR)6X&~$3cwGwg*YWxD^0v7BrZnZ}`ulWwSHIua4tKWvP)|>nAIG>~ zYSiC1c&DS8)kAq;!DkUhZSbS}FkYS3U-p=&WFtIl3a4d2&yz0UYk3VdXmy3aP7O30 zdyg<1Pu2=(uedCGVemE!sU&{2((|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|-vnVk>Q_M(ES257*d&#vLQC26nzM=13HMZMFkXie;qwOsFqaN+7`d%Q||H09>tqqMo!Z8M>(DT zX)hbE>Zf<2ekP|=-yw8fqeV3F!n=9zC2vu9DBlmO>l)^dYH<_gwgOto{Iu9H!G&tH z0ygIF literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/english.utf16le.lf.bom.txt b/bin/unit_tests/assets/textformat/english.utf16le.lf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..70737cea68a437f1b0236c9fe65c39199ae94a17 GIT binary patch literal 7862 zcmbW6UsD@L5XA3UpF(d=szN?M-fSloc!+Ts5|G)S z+S{F->FMd6J^%gJS$F8B-BUN~di|a0-@My*n{M4**ONuJ>$cre<4Zk#*56Hcr{8b8 z`LOE&-+h`_p+4~RqvZ=_og%)1#W%Z#DjkT%1ZOb1bS?W0+ z@OdY1rrmF418??a<(ERZ*C>ee+IdoVG`n|tLToSh2h%po@sYWe;^7%<$a-HQC0oZgtW0DX8(;(~ z%(&M#VkI&d2Ws$wjO~y6n=|H8@<%4&=6%h4KC*RIHs`X22UwdGKfISS0#0TY2yP3j zv+{7M@q1Zals|X}3vO!vAIQ1A#v)2zAk2kRq z%s>l#iNYw76LvH&*afznX!lL=3-lTf*poPCdWP@w!U>hY7kh4Wj7D<2*ADB#eW?|! zbQDWP3KLiI>#FP?j#+g6U+M_H6C>#0Ym1a@&*U>T2y={mR1s{ag)3`8>{)Zo@?eDu zT&C{^#C%N0|#6~M(?0Ccu&5}$L!c^6xDT|J(ai7OfU^Hw(ojojq5r4VPjRy zp+XnMby!ZuJu~|)jyc3H^oMFsRY&=WFsH(`JYvRcXx+;@co2>>Z>Th|ysaEAYX?+l zBFk{fadpB331W&nJj!G6Vt%Ru)Zl$MnA3pO@MEZVoC<5%GjGTEyL#Zb z6&M0k{rN}=#{&_!@sp)8`)uqR9_6b5i-dX@xYi=J`6y~nuk8WIIYRw@Gd}qhf=w3 ziju)ND+<`VLM~+yoZ$qVf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^v$tF0&D1H!xrLdjJL|T7Lo%4PV{5<2P zMnS-};Qqz&pyPSB)A}DYxy?o|z`#iQbR$M~SZf|RAr7(xI@AU}pX&RQP{IpX?prIF z#4}dliS6~WMg@~MPz%~r3CQI=;!t_eQ0`!PkDim$w&Njjpn+tT-q@J~jWL?shI~u( zIp{aBVR}m8@fnKWj>r*!5$DMe!D#JsDUt7=zMHkv4=n>raC|4vP~9=| zr~r5cD|Q;PEZ77UXBq5=v6EG5#C0{ah1X<~tmD_NeECw@a361-gm3697Ebh&^Cn|t zvuQc#%r%>M8dmVFy{{r;R&x+OlvT#!9U9JUp0_1*7^&7~FY$m0IuX4K)2UG^bXZG9 t06biE`0YyO)A%ldHxpT4Ce>x$c%JRBbKZEQCh&zfIAjwGd9%P>^&bYpgDU_4 literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/english.utf16le.lf.nobom.txt b/bin/unit_tests/assets/textformat/english.utf16le.lf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..c522e29818790c7070c2cbd9573bfba7afab8d62 GIT binary patch literal 7860 zcmbW+K~o&b5e48r&#&ONc7)|0;M;2LuypWhV}-5I5ttFe0wFU;*jX608 z!Ax~kR_4o>ud-UNm;2>pd05VtWBom=f9K2Hau|3@%rgK)}let61 z8#fCP-dYd`efl|WOlcl z)(8wgj=9%^d02HUi-%fmhhT7Ce}gz&<>S15&dRp+&A4Xg-FR|RR?f=Cv3A4JSo=Iy z@Rp@m=Nl`#vdjjIpkl_C`X*M9VI0)(LdNbM_YY^nrOuyB;^vnz^ZO%P&xXzOvc?0} z&IUiSS26;pFbjg$1FP4=!+ni^DXSO5AKqcX&DaBO&0<-;t8sDQ(TB0iVfbJ)^=F@~ zkaLKu$L6%X{#4`bP1|V9paox11VuTqV|ZZ~Y&dl!{xwzUn{Ik6#I%46A$Irhhg{rF^kFnQyt;E7@@=08L4camCtGrbAo-V zB5Y3vuGT{Ad(92Y8!IaCp`Ka&m&e*t50L3OIFK3&diS-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JahXa{#Iu*__gC}%-qX8Os+_;QXR|K#saCItLWXDCKIP}Jo0T~g zC^3b7U%yi^ztn1sh4N|5bJ{&0m9=Ur?;OL+uoY+6&=;p;2yfN$%}^1ij!q?KPwK!<87{dA%Hj7OerqfVD&mw2uQb90=LV2xh3*&?pV_;?)4>BV=obHCq% zUuJw7qYy|fq<={~biCi~%>IWa&)M_>20=2Xn;7kIS@YyX9I^x*wZZ3C_5Gnx;suuH z)+&=cvw|nFcPwivSl*!4XsZ&)^?Ss%^3YIsuzru;CueN8hvJ}tGOIUE=Af}f(`_iX z#GHe96T4ONaGvK-&#A{UP01O`??jXcVB|bmBiLH|eJD}xpShdO(~p+H5{@s+Gpf5q zo(jOLv9i;eWsOavk}Si19lNZmk<``N7O!Pe*7P` s;E}51cPiPZ?OlR5yRu-W>I!c%FLvzQZ#=pt_~H$YY_iaA7Ti_;1N1(DE&u=k literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/english.utf8.crlf.bom.txt b/bin/unit_tests/assets/textformat/english.utf8.crlf.bom.txt new file mode 100644 index 000000000..586cff94b --- /dev/null +++ b/bin/unit_tests/assets/textformat/english.utf8.crlf.bom.txt @@ -0,0 +1,60 @@ +It was a bright cold day in April, and the clocks were striking thirteen. +Winston Smith, his chin nuzzled into his breast in an effort to escape the +vile wind, slipped quickly through the glass doors of Victory Mansions, +though not quickly enough to prevent a swirl of gritty dust from entering +along with him. + +The hallway smelt of boiled cabbage and old rag mats. At one end of it a +coloured poster, too large for indoor display, had been tacked to the wall. +It depicted simply an enormous face, more than a metre wide: the face of a +man of about forty-five, with a heavy black moustache and ruggedly handsome +features. Winston made for the stairs. It was no use trying the lift. Even +at the best of times it was seldom working, and at present the electric +current was cut off during daylight hours. It was part of the economy drive +in preparation for Hate Week. The flat was seven flights up, and Winston, +who was thirty-nine and had a varicose ulcer above his right ankle, went +slowly, resting several times on the way. On each landing, opposite the +lift-shaft, the poster with the enormous face gazed from the wall. It was +one of those pictures which are so contrived that the eyes follow you about +when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran. + +Inside the flat a fruity voice was reading out a list of figures which had +something to do with the production of pig-iron. The voice came from an +oblong metal plaque like a dulled mirror which formed part of the surface +of the right-hand wall. Winston turned a switch and the voice sank +somewhat, though the words were still distinguishable. The instrument +(the telescreen, it was called) could be dimmed, but there was no way of +shutting it off completely. He moved over to the window: a smallish, frail +figure, the meagreness of his body merely emphasized by the blue overalls +which were the uniform of the party. His hair was very fair, his face +naturally sanguine, his skin roughened by coarse soap and blunt razor +blades and the cold of the winter that had just ended. + +Outside, even through the shut window-pane, the world looked cold. Down in +the street little eddies of wind were whirling dust and torn paper into +spirals, and though the sun was shining and the sky a harsh blue, there +seemed to be no colour in anything, except the posters that were plastered +everywhere. The black-moustachio'd face gazed down from every commanding +corner. There was one on the house-front immediately opposite. BIG BROTHER +IS WATCHING YOU, the caption said, while the dark eyes looked deep into +Winston's own. Down at street level another poster, torn at one corner, +flapped fitfully in the wind, alternately covering and uncovering the +single word INGSOC. In the far distance a helicopter skimmed down between +the roofs, hovered for an instant like a bluebottle, and darted away again +with a curving flight. It was the police patrol, snooping into people's +windows. The patrols did not matter, however. Only the Thought Police +mattered. + +Behind Winston's back the voice from the telescreen was still babbling away +about pig-iron and the overfulfilment of the Ninth Three-Year Plan. The +telescreen received and transmitted simultaneously. Any sound that Winston +made, above the level of a very low whisper, would be picked up by it, +moreover, so long as he remained within the field of vision which the metal +plaque commanded, he could be seen as well as heard. There was of course +no way of knowing whether you were being watched at any given moment. How +often, or on what system, the Thought Police plugged in on any individual +wire was guesswork. It was even conceivable that they watched everybody all +the time. But at any rate they could plug in your wire whenever they wanted +to. You had to live--did live, from habit that became instinct--in the +assumption that every sound you made was overheard, and, except in +darkness, every movement scrutinized. diff --git a/bin/unit_tests/assets/textformat/english.utf8.crlf.nobom.txt b/bin/unit_tests/assets/textformat/english.utf8.crlf.nobom.txt new file mode 100644 index 000000000..fae949ade --- /dev/null +++ b/bin/unit_tests/assets/textformat/english.utf8.crlf.nobom.txt @@ -0,0 +1,60 @@ +It was a bright cold day in April, and the clocks were striking thirteen. +Winston Smith, his chin nuzzled into his breast in an effort to escape the +vile wind, slipped quickly through the glass doors of Victory Mansions, +though not quickly enough to prevent a swirl of gritty dust from entering +along with him. + +The hallway smelt of boiled cabbage and old rag mats. At one end of it a +coloured poster, too large for indoor display, had been tacked to the wall. +It depicted simply an enormous face, more than a metre wide: the face of a +man of about forty-five, with a heavy black moustache and ruggedly handsome +features. Winston made for the stairs. It was no use trying the lift. Even +at the best of times it was seldom working, and at present the electric +current was cut off during daylight hours. It was part of the economy drive +in preparation for Hate Week. The flat was seven flights up, and Winston, +who was thirty-nine and had a varicose ulcer above his right ankle, went +slowly, resting several times on the way. On each landing, opposite the +lift-shaft, the poster with the enormous face gazed from the wall. It was +one of those pictures which are so contrived that the eyes follow you about +when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran. + +Inside the flat a fruity voice was reading out a list of figures which had +something to do with the production of pig-iron. The voice came from an +oblong metal plaque like a dulled mirror which formed part of the surface +of the right-hand wall. Winston turned a switch and the voice sank +somewhat, though the words were still distinguishable. The instrument +(the telescreen, it was called) could be dimmed, but there was no way of +shutting it off completely. He moved over to the window: a smallish, frail +figure, the meagreness of his body merely emphasized by the blue overalls +which were the uniform of the party. His hair was very fair, his face +naturally sanguine, his skin roughened by coarse soap and blunt razor +blades and the cold of the winter that had just ended. + +Outside, even through the shut window-pane, the world looked cold. Down in +the street little eddies of wind were whirling dust and torn paper into +spirals, and though the sun was shining and the sky a harsh blue, there +seemed to be no colour in anything, except the posters that were plastered +everywhere. The black-moustachio'd face gazed down from every commanding +corner. There was one on the house-front immediately opposite. BIG BROTHER +IS WATCHING YOU, the caption said, while the dark eyes looked deep into +Winston's own. Down at street level another poster, torn at one corner, +flapped fitfully in the wind, alternately covering and uncovering the +single word INGSOC. In the far distance a helicopter skimmed down between +the roofs, hovered for an instant like a bluebottle, and darted away again +with a curving flight. It was the police patrol, snooping into people's +windows. The patrols did not matter, however. Only the Thought Police +mattered. + +Behind Winston's back the voice from the telescreen was still babbling away +about pig-iron and the overfulfilment of the Ninth Three-Year Plan. The +telescreen received and transmitted simultaneously. Any sound that Winston +made, above the level of a very low whisper, would be picked up by it, +moreover, so long as he remained within the field of vision which the metal +plaque commanded, he could be seen as well as heard. There was of course +no way of knowing whether you were being watched at any given moment. How +often, or on what system, the Thought Police plugged in on any individual +wire was guesswork. It was even conceivable that they watched everybody all +the time. But at any rate they could plug in your wire whenever they wanted +to. You had to live--did live, from habit that became instinct--in the +assumption that every sound you made was overheard, and, except in +darkness, every movement scrutinized. diff --git a/bin/unit_tests/assets/textformat/english.utf8.lf.bom.txt b/bin/unit_tests/assets/textformat/english.utf8.lf.bom.txt new file mode 100644 index 000000000..3a341f83d --- /dev/null +++ b/bin/unit_tests/assets/textformat/english.utf8.lf.bom.txt @@ -0,0 +1,60 @@ +It was a bright cold day in April, and the clocks were striking thirteen. +Winston Smith, his chin nuzzled into his breast in an effort to escape the +vile wind, slipped quickly through the glass doors of Victory Mansions, +though not quickly enough to prevent a swirl of gritty dust from entering +along with him. + +The hallway smelt of boiled cabbage and old rag mats. At one end of it a +coloured poster, too large for indoor display, had been tacked to the wall. +It depicted simply an enormous face, more than a metre wide: the face of a +man of about forty-five, with a heavy black moustache and ruggedly handsome +features. Winston made for the stairs. It was no use trying the lift. Even +at the best of times it was seldom working, and at present the electric +current was cut off during daylight hours. It was part of the economy drive +in preparation for Hate Week. The flat was seven flights up, and Winston, +who was thirty-nine and had a varicose ulcer above his right ankle, went +slowly, resting several times on the way. On each landing, opposite the +lift-shaft, the poster with the enormous face gazed from the wall. It was +one of those pictures which are so contrived that the eyes follow you about +when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran. + +Inside the flat a fruity voice was reading out a list of figures which had +something to do with the production of pig-iron. The voice came from an +oblong metal plaque like a dulled mirror which formed part of the surface +of the right-hand wall. Winston turned a switch and the voice sank +somewhat, though the words were still distinguishable. The instrument +(the telescreen, it was called) could be dimmed, but there was no way of +shutting it off completely. He moved over to the window: a smallish, frail +figure, the meagreness of his body merely emphasized by the blue overalls +which were the uniform of the party. His hair was very fair, his face +naturally sanguine, his skin roughened by coarse soap and blunt razor +blades and the cold of the winter that had just ended. + +Outside, even through the shut window-pane, the world looked cold. Down in +the street little eddies of wind were whirling dust and torn paper into +spirals, and though the sun was shining and the sky a harsh blue, there +seemed to be no colour in anything, except the posters that were plastered +everywhere. The black-moustachio'd face gazed down from every commanding +corner. There was one on the house-front immediately opposite. BIG BROTHER +IS WATCHING YOU, the caption said, while the dark eyes looked deep into +Winston's own. Down at street level another poster, torn at one corner, +flapped fitfully in the wind, alternately covering and uncovering the +single word INGSOC. In the far distance a helicopter skimmed down between +the roofs, hovered for an instant like a bluebottle, and darted away again +with a curving flight. It was the police patrol, snooping into people's +windows. The patrols did not matter, however. Only the Thought Police +mattered. + +Behind Winston's back the voice from the telescreen was still babbling away +about pig-iron and the overfulfilment of the Ninth Three-Year Plan. The +telescreen received and transmitted simultaneously. Any sound that Winston +made, above the level of a very low whisper, would be picked up by it, +moreover, so long as he remained within the field of vision which the metal +plaque commanded, he could be seen as well as heard. There was of course +no way of knowing whether you were being watched at any given moment. How +often, or on what system, the Thought Police plugged in on any individual +wire was guesswork. It was even conceivable that they watched everybody all +the time. But at any rate they could plug in your wire whenever they wanted +to. You had to live--did live, from habit that became instinct--in the +assumption that every sound you made was overheard, and, except in +darkness, every movement scrutinized. diff --git a/bin/unit_tests/assets/textformat/english.utf8.lf.nobom.txt b/bin/unit_tests/assets/textformat/english.utf8.lf.nobom.txt new file mode 100644 index 000000000..8546d9f00 --- /dev/null +++ b/bin/unit_tests/assets/textformat/english.utf8.lf.nobom.txt @@ -0,0 +1,60 @@ +It was a bright cold day in April, and the clocks were striking thirteen. +Winston Smith, his chin nuzzled into his breast in an effort to escape the +vile wind, slipped quickly through the glass doors of Victory Mansions, +though not quickly enough to prevent a swirl of gritty dust from entering +along with him. + +The hallway smelt of boiled cabbage and old rag mats. At one end of it a +coloured poster, too large for indoor display, had been tacked to the wall. +It depicted simply an enormous face, more than a metre wide: the face of a +man of about forty-five, with a heavy black moustache and ruggedly handsome +features. Winston made for the stairs. It was no use trying the lift. Even +at the best of times it was seldom working, and at present the electric +current was cut off during daylight hours. It was part of the economy drive +in preparation for Hate Week. The flat was seven flights up, and Winston, +who was thirty-nine and had a varicose ulcer above his right ankle, went +slowly, resting several times on the way. On each landing, opposite the +lift-shaft, the poster with the enormous face gazed from the wall. It was +one of those pictures which are so contrived that the eyes follow you about +when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran. + +Inside the flat a fruity voice was reading out a list of figures which had +something to do with the production of pig-iron. The voice came from an +oblong metal plaque like a dulled mirror which formed part of the surface +of the right-hand wall. Winston turned a switch and the voice sank +somewhat, though the words were still distinguishable. The instrument +(the telescreen, it was called) could be dimmed, but there was no way of +shutting it off completely. He moved over to the window: a smallish, frail +figure, the meagreness of his body merely emphasized by the blue overalls +which were the uniform of the party. His hair was very fair, his face +naturally sanguine, his skin roughened by coarse soap and blunt razor +blades and the cold of the winter that had just ended. + +Outside, even through the shut window-pane, the world looked cold. Down in +the street little eddies of wind were whirling dust and torn paper into +spirals, and though the sun was shining and the sky a harsh blue, there +seemed to be no colour in anything, except the posters that were plastered +everywhere. The black-moustachio'd face gazed down from every commanding +corner. There was one on the house-front immediately opposite. BIG BROTHER +IS WATCHING YOU, the caption said, while the dark eyes looked deep into +Winston's own. Down at street level another poster, torn at one corner, +flapped fitfully in the wind, alternately covering and uncovering the +single word INGSOC. In the far distance a helicopter skimmed down between +the roofs, hovered for an instant like a bluebottle, and darted away again +with a curving flight. It was the police patrol, snooping into people's +windows. The patrols did not matter, however. Only the Thought Police +mattered. + +Behind Winston's back the voice from the telescreen was still babbling away +about pig-iron and the overfulfilment of the Ninth Three-Year Plan. The +telescreen received and transmitted simultaneously. Any sound that Winston +made, above the level of a very low whisper, would be picked up by it, +moreover, so long as he remained within the field of vision which the metal +plaque commanded, he could be seen as well as heard. There was of course +no way of knowing whether you were being watched at any given moment. How +often, or on what system, the Thought Police plugged in on any individual +wire was guesswork. It was even conceivable that they watched everybody all +the time. But at any rate they could plug in your wire whenever they wanted +to. You had to live--did live, from habit that became instinct--in the +assumption that every sound you made was overheard, and, except in +darkness, every movement scrutinized. diff --git a/bin/unit_tests/assets/textformat/french.utf16be.crlf.bom.txt b/bin/unit_tests/assets/textformat/french.utf16be.crlf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..0aa6bc99e1b61470c868fcad530dd19162961d71 GIT binary patch literal 7574 zcmb7}TW?!c5QXKuExR z^Let5od7~r6Z@QfSu?X{&Fq~&|7s7~tc}_i?c4bOb-NRvpR~{7=lyot#%3s10|XJ=^*cozAcx1)9v^Jd{g-hYh$j1;GPxieU1 zxdS-I;VWkG`M3B_ED!SuzFK75^~)@xK*WjKJU*@B(|+u;++e_8tb%8G$E@R=FXof> zN6y&AGEXdvnAz7lZp7;_#+Uv2WSQ$71rl~Sy7nfsCoz5!zvbnq9Rx0-u}oCQxmLZK z$Gh{e;ymBsmq|tyZ@^4^&fa)pmFp0HKJi;#@$M|vz)!{pzw@kSpSR!Rjouq_p6nqT zE+h6tNCt|W=wKHt{1AJQ1Ecmb#)AuX8fhYamEP$7+>5txh54W-_C(|~QGttZM5Yj8 z%PMfxcUC1gwVwIlnP-L-Ux#S*h?z*F*i}DOymsw#hR8rN3m@RW?X2J%F`g!3dA&?e zpg~}I(*8+NPOj&{6SYD{<4x9t1w_)Ufw!tzj~p|9h_P3x3uMbd&bkOZJ*(i*L3|g{ z&*}Thozge+ZyGp=URhZjnr|`~bp;jqx6VBl$wcGOGvqYh!W?tc2;=c_%tSA+1ckbj zKAMIV#b_dfYA{>Yu^XOUWYiAg(=7h+6x|_CW-qD$qpl*`Pty+8l7~co7CZ7pUSJ6f zfZfF-VnEDRi4=T{)|c<%Gd2?iG8%SoX9S!*iMMC5rm^G6&8XpVFkd83wyPAitM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_#~20^7&mHHgf8$3_+4J?v7wV3!JB zm0V@2Q-FBNr}~i7;P@L2_)!g_bGSEsxZU6QD@P>EUZlQ6|fVE1#p z8}+hAPuKZ5Uht-fy;{+SS+@RN4$Xw!%yDZ#wG@PxMbPfLpSHfQ8 literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/french.utf16le.crlf.bom.txt b/bin/unit_tests/assets/textformat/french.utf16le.crlf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..fdc52d8d41093b4dfe284a5ca707608c55b998ca GIT binary patch literal 7574 zcmb7}TW?!c5QXKuExR z^Let5od7~r6Z@QfSu?X{&Fr1O{(R78ZPdPK-^Ty1+nxCQqU~%Uo{~D^3&7QO@6sS?oNC{mygTMdG?jjLUetpSw-s-Mick z>=*5B%x0}oj6RHit2V#Jh^3<#Gie_J*KuOnMJo1r%)nB2Lui@o5#G_G6#r1_Sg!}d16__%)ZufBVLCwzUycW1E%elkAzoo6-sy!{?;^xly3WDnVJ z8L=lqGEn412fJY5huDi87`2x%9$c`~NE7j^^hWpRUc7}X%m+QOCnBeb3S4|6GKCOZ zR)M3wvnsi%^~?v)JTt8LIz+2S%tRu^uKKCswQHXt%WZ z4Fc1X_D_m(ay<{8s1-6AZ?YyVAd+Scyj9J5|!*CVGJ-DAb+w z(KM_mMiUuSgW0l<-SF%pqjnIVX7P`w=nio*dr<`#brsouns%_3JS6h7*pVml0!v^3 z>@FS=17fyHq~K$;zI+#-v6(24(Xe|vBjD^wygiFGjU7*JMh%aH`679;U8Sg9oiBQa zs2W)`t+2}S^3-_aP4KD=r9h~>G2YL0up2JGDOF>>!EG*fyfAOb3iA6=ScZp&Dsd3@ zke6EDGrHo91}_3d#SH}TYgl98@zB%EA?wsEtFS(0_Bv3k!(x4*mtMynC^1+{aW2C9 z_?mU7+tbXF%6OtnMJ7hXgSb_l(hDk3c|rD;hIBvMC&*Q8L@Dr+d5hM<81_?nczzY% zumA*P4?Y6BtazNb;2TwstON_|ly1prqg>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assets/textformat/french.utf16le.lf.bom.txt b/bin/unit_tests/assets/textformat/french.utf16le.lf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..a5b5abbf319098efd3f417357b0162711ffbab54 GIT binary patch literal 7442 zcmb7}%Wh-W5k>EqU%^>VtRO)iNbG?TJ2ucj+p%H9Q$r7`n+@s_QW9i;ZDx-A2SI>1 zd(~3uT#AZ;pwSX}?|JO1+O@0B(a-<+Y`UD5({H9f=Kt@f5Ayko=~wyr>GW1tZnlTY${l_z)g^R{MwpHV#BwOwRgK#fs{2BCleb5;*E;Wh zsJ%eGn?A~H)>>xtY5v_#*G~wsbD1&g>7PNh3ZmyI#eJPw*ssriJ^i83FQ%{a9M80k zr?uYMlTGZ3t;_i1Dq~OMU%p| z>EAVDAIWtg*=F8YX*Ch0(~NH0^~X)Eb`~7$arWd%X0J1To!@eCIh_O*QMf5gt6Hny zUFY3ZY`Cg-_+*_};t9Bjx7isl+}0|@oKO6gOT4?t3i!y#;BlVy?5pWtd86m%EGJ*! z|6QU^Y-F9d;nO;+oF=NftVE7|o6(?xk4BhC-H)7KG zu;ex<`a7$Vi`vfoMeHM^nx%83dc({kM(nANI#SPVbB4IUaT)vZ-F`0cjp%L)uWY_4 zKcF~^=+6IAkMpNl@Iz&g$9R$zi9RtjQ(&vgHDbohKWFTHsQ@{0QnPkJGcpP8oa8%r z{#st|d}$>!<2FG-+}gtC&h=x?qN89U=N@W@Z86XYjJ$Z4w=l+hG`4vAI5SZQ>_Ck^ z2%b$WXdV+2RD!v3jlJ;cw&Hb?PnY?}Q*?$1nXl*oOuA2gzbh+POa2k_%k0M!8G#+d z9!@uZ@c$yuKnXU+>ct=O8GG?RISi-wvjC=^=j}ySG-^CKj2GSp@viu>UyGB1l-LbxIyvQMxWL`XOVmL|ue=60uE8_iZQMj6$%@4f~DtPu%m-aj}Sb=IYY#6bWbIa*{ zJcl|ks=0g|pSxdjvCQ&;fU!9=u(5!k+|2%YEKMR|Lfd^OhWM7-EbB`5OaD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=)js4_-!yggvS+1QbA#SzA#;g4?zZr@&~Ub1SJ&`g Dh1p=? literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/french.utf16le.lf.nobom.txt b/bin/unit_tests/assets/textformat/french.utf16le.lf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..1a06686aca756f233d9dca0c7c1c973c98142857 GIT binary patch literal 7440 zcmb7}%Wh-W5k>EqU%^>VtRR7tAc+S?`~n(iJ2s4XYUn|Avq3#Vih}H~&CHSiAjl+p z)l%tPO0of?(Gq#@dF-m%wX4q2=hNl1oc=KVCIA04eUQ&zPQS~~Pp5a&@wA;b(`wpH zN7EPie4MdAO;^*po_vzut30`_pZl8mLq_p*lW+IaO=hg~lh3!)&(puAecmmnv-baK)m*;TxQIA`cF`;g6JtqabIT^_Up6XPk%1-i|Ly@$1`o?X{~qm zXcN0)>oWeh%GlHRmv30I3<{oLGtVx{4v=i?J8zfMdFEXP74Lt}e@2SYz1(?`F{}^5 z?-OTYb)8T9d^*Z5HxCH#6RY4+-Z5)c^F@3<{jX*m zBDpRk+sqp)ttO&$n$c~${~+Sk^II-1r<0%}3O9vmRcrOT>%6;) z4OjIJpR5y0JOLN+Hap{meXT;w`NVIz#Jh{EfRBs}9_LxlzMB4Sl#5$1!Pm=lY4g$Y!ABPNXxOZGw0 z-&vJh)OO}CVjmgRES)3O8)hCcVo!b4k$P&IGsFds%h-?a4s(HTM0ZnoW%Et>0mWHF zcYaAd&L3yN50yb4<4IN|`oz#ofvqanh#52gp0RhO0_4a^&DsUc$RxOPlJDU8M|r*T zrIpN#+XMx1YYUq@*AF?1j)IAtyRRL##Xuu4^5R|I!Wi?>*y8Qu%tRru12y^}cs8-1 zc}z@D3FgW*_QI#ziq}a#UFIK8(HSCSzM=y#=`Q*GuB>1!`A5tzvmZ}n1a=U6INkig z|BE~WCD<6N7k|uW?8X1&Fq}Tj0+@Q9w-;H_sPW`^yzn-Ncg2sxT115!Ou;im(}<#A zjZ<#7m&A%a!-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yl_$i2vk=Q4 ztK|5B(*|BA8%MQo4x=`ltFcH($H^0qK@80H`;LQnVH2BL2`Pc90z2$yYr@2vW z`;=og-eyPgME{{SAfQWWc6B|%YhdoPw;lexrmIt}|8q50s6ka88R$}jf}=Rd(G!}13j83kWJJ|sw8v7bU5em?5+w~b$a|uCvv&{ z+#Yd_E}%Q;p{3aAU7>LsoHD1V7WSp1ZVV-FWh9$WbE2!}^|^e0N6zV={CR$>=H4hq z|3w5wSWQ|{@xMM)BfFF2{fGgX#9tZYRM#U$P-9(zxV?_|pL(Yw>?yB;72ux&eOf=!|ndYUtwA+8H>h~$@6FWhDywOAB8Da0=u8* zyHPKD^n9J~;{|Vu*qgP!uYJg^zG>>}WzR~r<_5jbLgo^8+->2$&~Ub1SJ&`=wxwR= literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/french.utf8.crlf.bom.txt b/bin/unit_tests/assets/textformat/french.utf8.crlf.bom.txt new file mode 100644 index 000000000..d89e2a742 --- /dev/null +++ b/bin/unit_tests/assets/textformat/french.utf8.crlf.bom.txt @@ -0,0 +1,66 @@ +En 1815, M. Charles-François-Bienvenu Myriel était évêque de Digne. +C'était un vieillard d'environ soixante-quinze ans; il occupait le siège +de Digne depuis 1806. + +Quoique ce détail ne touche en aucune manière au fond même de ce que +nous avons à raconter, il n'est peut-être pas inutile, ne fût-ce que +pour être exact en tout, d'indiquer ici les bruits et les propos qui +avaient couru sur son compte au moment où il était arrivé dans le +diocèse. Vrai ou faux, ce qu'on dit des hommes tient souvent autant de +place dans leur vie et surtout dans leur destinée que ce qu'ils font. M. +Myriel était fils d'un conseiller au parlement d'Aix; noblesse de robe. +On contait de lui que son père, le réservant pour hériter de sa charge, +l'avait marié de fort bonne heure, à dix-huit ou vingt ans, suivant un +usage assez répandu dans les familles parlementaires. Charles Myriel, +nonobstant ce mariage, avait, disait-on, beaucoup fait parler de lui. Il +était bien fait de sa personne, quoique d'assez petite taille, élégant, +gracieux, spirituel; toute la première partie de sa vie avait été donnée +au monde et aux galanteries. La révolution survint, les événements se +précipitèrent, les familles parlementaires décimées, chassées, traquées, +se dispersèrent. M. Charles Myriel, dès les premiers jours de la +révolution, émigra en Italie. Sa femme y mourut d'une maladie de +poitrine dont elle était atteinte depuis longtemps. Ils n'avaient point +d'enfants. Que se passa-t-il ensuite dans la destinée de M. Myriel? +L'écroulement de l'ancienne société française, la chute de sa propre +famille, les tragiques spectacles de 93, plus effrayants encore +peut-être pour les émigrés qui les voyaient de loin avec le +grossissement de l'épouvante, firent-ils germer en lui des idées de +renoncement et de solitude? Fut-il, au milieu d'une de ces distractions +et de ces affections qui occupaient sa vie, subitement atteint d'un de +ces coups mystérieux et terribles qui viennent quelquefois renverser, en +le frappant au coeur, l'homme que les catastrophes publiques +n'ébranleraient pas en le frappant dans son existence et dans sa +fortune? Nul n'aurait pu le dire; tout ce qu'on savait, c'est que, +lorsqu'il revint d'Italie, il était prêtre. + +En 1804, M. Myriel était curé de Brignolles. Il était déjà vieux, et +vivait dans une retraite profonde. + +Vers l'époque du couronnement, une petite affaire de sa cure, on ne sait +plus trop quoi, l'amena à Paris. Entre autres personnes puissantes, il +alla solliciter pour ses paroissiens M. le cardinal Fesch. Un jour que +l'empereur était venu faire visite à son oncle, le digne curé, qui +attendait dans l'antichambre, se trouva sur le passage de sa majesté. +Napoléon, se voyant regardé avec une certaine curiosité par ce +vieillard, se retourna, et dit brusquement: + +--Quel est ce bonhomme qui me regarde? + +--Sire, dit M. Myriel, vous regardez un bonhomme, et moi je regarde un +grand homme. Chacun de nous peut profiter. + +L'empereur, le soir même, demanda au cardinal le nom de ce curé, et +quelque temps après M. Myriel fut tout surpris d'apprendre qu'il était +nommé évêque de Digne. + +Qu'y avait-il de vrai, du reste, dans les récits qu'on faisait sur la +première partie de la vie de M. Myriel? Personne ne le savait. Peu de +familles avaient connu la famille Myriel avant la révolution. + +M. Myriel devait subir le sort de tout nouveau venu dans une petite +ville où il y a beaucoup de bouches qui parlent et fort peu de têtes qui +pensent. Il devait le subir, quoiqu'il fût évêque et parce qu'il était +évêque. Mais, après tout, les propos auxquels on mêlait son nom +n'étaient peut-être que des propos; du bruit, des mots, des paroles; +moins que des paroles, des _palabres_, comme dit l'énergique langue du +midi. diff --git a/bin/unit_tests/assets/textformat/french.utf8.crlf.nobom.txt b/bin/unit_tests/assets/textformat/french.utf8.crlf.nobom.txt new file mode 100644 index 000000000..1f836cf72 --- /dev/null +++ b/bin/unit_tests/assets/textformat/french.utf8.crlf.nobom.txt @@ -0,0 +1,66 @@ +En 1815, M. Charles-François-Bienvenu Myriel était évêque de Digne. +C'était un vieillard d'environ soixante-quinze ans; il occupait le siège +de Digne depuis 1806. + +Quoique ce détail ne touche en aucune manière au fond même de ce que +nous avons à raconter, il n'est peut-être pas inutile, ne fût-ce que +pour être exact en tout, d'indiquer ici les bruits et les propos qui +avaient couru sur son compte au moment où il était arrivé dans le +diocèse. Vrai ou faux, ce qu'on dit des hommes tient souvent autant de +place dans leur vie et surtout dans leur destinée que ce qu'ils font. M. +Myriel était fils d'un conseiller au parlement d'Aix; noblesse de robe. +On contait de lui que son père, le réservant pour hériter de sa charge, +l'avait marié de fort bonne heure, à dix-huit ou vingt ans, suivant un +usage assez répandu dans les familles parlementaires. Charles Myriel, +nonobstant ce mariage, avait, disait-on, beaucoup fait parler de lui. Il +était bien fait de sa personne, quoique d'assez petite taille, élégant, +gracieux, spirituel; toute la première partie de sa vie avait été donnée +au monde et aux galanteries. La révolution survint, les événements se +précipitèrent, les familles parlementaires décimées, chassées, traquées, +se dispersèrent. M. Charles Myriel, dès les premiers jours de la +révolution, émigra en Italie. Sa femme y mourut d'une maladie de +poitrine dont elle était atteinte depuis longtemps. Ils n'avaient point +d'enfants. Que se passa-t-il ensuite dans la destinée de M. Myriel? +L'écroulement de l'ancienne société française, la chute de sa propre +famille, les tragiques spectacles de 93, plus effrayants encore +peut-être pour les émigrés qui les voyaient de loin avec le +grossissement de l'épouvante, firent-ils germer en lui des idées de +renoncement et de solitude? Fut-il, au milieu d'une de ces distractions +et de ces affections qui occupaient sa vie, subitement atteint d'un de +ces coups mystérieux et terribles qui viennent quelquefois renverser, en +le frappant au coeur, l'homme que les catastrophes publiques +n'ébranleraient pas en le frappant dans son existence et dans sa +fortune? Nul n'aurait pu le dire; tout ce qu'on savait, c'est que, +lorsqu'il revint d'Italie, il était prêtre. + +En 1804, M. Myriel était curé de Brignolles. Il était déjà vieux, et +vivait dans une retraite profonde. + +Vers l'époque du couronnement, une petite affaire de sa cure, on ne sait +plus trop quoi, l'amena à Paris. Entre autres personnes puissantes, il +alla solliciter pour ses paroissiens M. le cardinal Fesch. Un jour que +l'empereur était venu faire visite à son oncle, le digne curé, qui +attendait dans l'antichambre, se trouva sur le passage de sa majesté. +Napoléon, se voyant regardé avec une certaine curiosité par ce +vieillard, se retourna, et dit brusquement: + +--Quel est ce bonhomme qui me regarde? + +--Sire, dit M. Myriel, vous regardez un bonhomme, et moi je regarde un +grand homme. Chacun de nous peut profiter. + +L'empereur, le soir même, demanda au cardinal le nom de ce curé, et +quelque temps après M. Myriel fut tout surpris d'apprendre qu'il était +nommé évêque de Digne. + +Qu'y avait-il de vrai, du reste, dans les récits qu'on faisait sur la +première partie de la vie de M. Myriel? Personne ne le savait. Peu de +familles avaient connu la famille Myriel avant la révolution. + +M. Myriel devait subir le sort de tout nouveau venu dans une petite +ville où il y a beaucoup de bouches qui parlent et fort peu de têtes qui +pensent. Il devait le subir, quoiqu'il fût évêque et parce qu'il était +évêque. Mais, après tout, les propos auxquels on mêlait son nom +n'étaient peut-être que des propos; du bruit, des mots, des paroles; +moins que des paroles, des _palabres_, comme dit l'énergique langue du +midi. diff --git a/bin/unit_tests/assets/textformat/french.utf8.lf.bom.txt b/bin/unit_tests/assets/textformat/french.utf8.lf.bom.txt new file mode 100644 index 000000000..fe75f78a2 --- /dev/null +++ b/bin/unit_tests/assets/textformat/french.utf8.lf.bom.txt @@ -0,0 +1,66 @@ +En 1815, M. Charles-François-Bienvenu Myriel était évêque de Digne. +C'était un vieillard d'environ soixante-quinze ans; il occupait le siège +de Digne depuis 1806. + +Quoique ce détail ne touche en aucune manière au fond même de ce que +nous avons à raconter, il n'est peut-être pas inutile, ne fût-ce que +pour être exact en tout, d'indiquer ici les bruits et les propos qui +avaient couru sur son compte au moment où il était arrivé dans le +diocèse. Vrai ou faux, ce qu'on dit des hommes tient souvent autant de +place dans leur vie et surtout dans leur destinée que ce qu'ils font. M. +Myriel était fils d'un conseiller au parlement d'Aix; noblesse de robe. +On contait de lui que son père, le réservant pour hériter de sa charge, +l'avait marié de fort bonne heure, à dix-huit ou vingt ans, suivant un +usage assez répandu dans les familles parlementaires. Charles Myriel, +nonobstant ce mariage, avait, disait-on, beaucoup fait parler de lui. Il +était bien fait de sa personne, quoique d'assez petite taille, élégant, +gracieux, spirituel; toute la première partie de sa vie avait été donnée +au monde et aux galanteries. La révolution survint, les événements se +précipitèrent, les familles parlementaires décimées, chassées, traquées, +se dispersèrent. M. Charles Myriel, dès les premiers jours de la +révolution, émigra en Italie. Sa femme y mourut d'une maladie de +poitrine dont elle était atteinte depuis longtemps. Ils n'avaient point +d'enfants. Que se passa-t-il ensuite dans la destinée de M. Myriel? +L'écroulement de l'ancienne société française, la chute de sa propre +famille, les tragiques spectacles de 93, plus effrayants encore +peut-être pour les émigrés qui les voyaient de loin avec le +grossissement de l'épouvante, firent-ils germer en lui des idées de +renoncement et de solitude? Fut-il, au milieu d'une de ces distractions +et de ces affections qui occupaient sa vie, subitement atteint d'un de +ces coups mystérieux et terribles qui viennent quelquefois renverser, en +le frappant au coeur, l'homme que les catastrophes publiques +n'ébranleraient pas en le frappant dans son existence et dans sa +fortune? Nul n'aurait pu le dire; tout ce qu'on savait, c'est que, +lorsqu'il revint d'Italie, il était prêtre. + +En 1804, M. Myriel était curé de Brignolles. Il était déjà vieux, et +vivait dans une retraite profonde. + +Vers l'époque du couronnement, une petite affaire de sa cure, on ne sait +plus trop quoi, l'amena à Paris. Entre autres personnes puissantes, il +alla solliciter pour ses paroissiens M. le cardinal Fesch. Un jour que +l'empereur était venu faire visite à son oncle, le digne curé, qui +attendait dans l'antichambre, se trouva sur le passage de sa majesté. +Napoléon, se voyant regardé avec une certaine curiosité par ce +vieillard, se retourna, et dit brusquement: + +--Quel est ce bonhomme qui me regarde? + +--Sire, dit M. Myriel, vous regardez un bonhomme, et moi je regarde un +grand homme. Chacun de nous peut profiter. + +L'empereur, le soir même, demanda au cardinal le nom de ce curé, et +quelque temps après M. Myriel fut tout surpris d'apprendre qu'il était +nommé évêque de Digne. + +Qu'y avait-il de vrai, du reste, dans les récits qu'on faisait sur la +première partie de la vie de M. Myriel? Personne ne le savait. Peu de +familles avaient connu la famille Myriel avant la révolution. + +M. Myriel devait subir le sort de tout nouveau venu dans une petite +ville où il y a beaucoup de bouches qui parlent et fort peu de têtes qui +pensent. Il devait le subir, quoiqu'il fût évêque et parce qu'il était +évêque. Mais, après tout, les propos auxquels on mêlait son nom +n'étaient peut-être que des propos; du bruit, des mots, des paroles; +moins que des paroles, des _palabres_, comme dit l'énergique langue du +midi. diff --git a/bin/unit_tests/assets/textformat/french.utf8.lf.nobom.txt b/bin/unit_tests/assets/textformat/french.utf8.lf.nobom.txt new file mode 100644 index 000000000..e142b06be --- /dev/null +++ b/bin/unit_tests/assets/textformat/french.utf8.lf.nobom.txt @@ -0,0 +1,66 @@ +En 1815, M. Charles-François-Bienvenu Myriel était évêque de Digne. +C'était un vieillard d'environ soixante-quinze ans; il occupait le siège +de Digne depuis 1806. + +Quoique ce détail ne touche en aucune manière au fond même de ce que +nous avons à raconter, il n'est peut-être pas inutile, ne fût-ce que +pour être exact en tout, d'indiquer ici les bruits et les propos qui +avaient couru sur son compte au moment où il était arrivé dans le +diocèse. Vrai ou faux, ce qu'on dit des hommes tient souvent autant de +place dans leur vie et surtout dans leur destinée que ce qu'ils font. M. +Myriel était fils d'un conseiller au parlement d'Aix; noblesse de robe. +On contait de lui que son père, le réservant pour hériter de sa charge, +l'avait marié de fort bonne heure, à dix-huit ou vingt ans, suivant un +usage assez répandu dans les familles parlementaires. Charles Myriel, +nonobstant ce mariage, avait, disait-on, beaucoup fait parler de lui. Il +était bien fait de sa personne, quoique d'assez petite taille, élégant, +gracieux, spirituel; toute la première partie de sa vie avait été donnée +au monde et aux galanteries. La révolution survint, les événements se +précipitèrent, les familles parlementaires décimées, chassées, traquées, +se dispersèrent. M. Charles Myriel, dès les premiers jours de la +révolution, émigra en Italie. Sa femme y mourut d'une maladie de +poitrine dont elle était atteinte depuis longtemps. Ils n'avaient point +d'enfants. Que se passa-t-il ensuite dans la destinée de M. Myriel? +L'écroulement de l'ancienne société française, la chute de sa propre +famille, les tragiques spectacles de 93, plus effrayants encore +peut-être pour les émigrés qui les voyaient de loin avec le +grossissement de l'épouvante, firent-ils germer en lui des idées de +renoncement et de solitude? Fut-il, au milieu d'une de ces distractions +et de ces affections qui occupaient sa vie, subitement atteint d'un de +ces coups mystérieux et terribles qui viennent quelquefois renverser, en +le frappant au coeur, l'homme que les catastrophes publiques +n'ébranleraient pas en le frappant dans son existence et dans sa +fortune? Nul n'aurait pu le dire; tout ce qu'on savait, c'est que, +lorsqu'il revint d'Italie, il était prêtre. + +En 1804, M. Myriel était curé de Brignolles. Il était déjà vieux, et +vivait dans une retraite profonde. + +Vers l'époque du couronnement, une petite affaire de sa cure, on ne sait +plus trop quoi, l'amena à Paris. Entre autres personnes puissantes, il +alla solliciter pour ses paroissiens M. le cardinal Fesch. Un jour que +l'empereur était venu faire visite à son oncle, le digne curé, qui +attendait dans l'antichambre, se trouva sur le passage de sa majesté. +Napoléon, se voyant regardé avec une certaine curiosité par ce +vieillard, se retourna, et dit brusquement: + +--Quel est ce bonhomme qui me regarde? + +--Sire, dit M. Myriel, vous regardez un bonhomme, et moi je regarde un +grand homme. Chacun de nous peut profiter. + +L'empereur, le soir même, demanda au cardinal le nom de ce curé, et +quelque temps après M. Myriel fut tout surpris d'apprendre qu'il était +nommé évêque de Digne. + +Qu'y avait-il de vrai, du reste, dans les récits qu'on faisait sur la +première partie de la vie de M. Myriel? Personne ne le savait. Peu de +familles avaient connu la famille Myriel avant la révolution. + +M. Myriel devait subir le sort de tout nouveau venu dans une petite +ville où il y a beaucoup de bouches qui parlent et fort peu de têtes qui +pensent. Il devait le subir, quoiqu'il fût évêque et parce qu'il était +évêque. Mais, après tout, les propos auxquels on mêlait son nom +n'étaient peut-être que des propos; du bruit, des mots, des paroles; +moins que des paroles, des _palabres_, comme dit l'énergique langue du +midi. diff --git a/bin/unit_tests/assets/textformat/french.win1252.crlf.nobom.txt b/bin/unit_tests/assets/textformat/french.win1252.crlf.nobom.txt new file mode 100644 index 000000000..0d77667f9 --- /dev/null +++ b/bin/unit_tests/assets/textformat/french.win1252.crlf.nobom.txt @@ -0,0 +1,66 @@ +En 1815, M. Charles-François-Bienvenu Myriel était évêque de Digne. +C'était un vieillard d'environ soixante-quinze ans; il occupait le siège +de Digne depuis 1806. + +Quoique ce détail ne touche en aucune manière au fond même de ce que +nous avons à raconter, il n'est peut-être pas inutile, ne fût-ce que +pour être exact en tout, d'indiquer ici les bruits et les propos qui +avaient couru sur son compte au moment où il était arrivé dans le +diocèse. Vrai ou faux, ce qu'on dit des hommes tient souvent autant de +place dans leur vie et surtout dans leur destinée que ce qu'ils font. M. +Myriel était fils d'un conseiller au parlement d'Aix; noblesse de robe. +On contait de lui que son père, le réservant pour hériter de sa charge, +l'avait marié de fort bonne heure, à dix-huit ou vingt ans, suivant un +usage assez répandu dans les familles parlementaires. Charles Myriel, +nonobstant ce mariage, avait, disait-on, beaucoup fait parler de lui. Il +était bien fait de sa personne, quoique d'assez petite taille, élégant, +gracieux, spirituel; toute la première partie de sa vie avait été donnée +au monde et aux galanteries. La révolution survint, les événements se +précipitèrent, les familles parlementaires décimées, chassées, traquées, +se dispersèrent. M. Charles Myriel, dès les premiers jours de la +révolution, émigra en Italie. Sa femme y mourut d'une maladie de +poitrine dont elle était atteinte depuis longtemps. Ils n'avaient point +d'enfants. Que se passa-t-il ensuite dans la destinée de M. Myriel? +L'écroulement de l'ancienne société française, la chute de sa propre +famille, les tragiques spectacles de 93, plus effrayants encore +peut-être pour les émigrés qui les voyaient de loin avec le +grossissement de l'épouvante, firent-ils germer en lui des idées de +renoncement et de solitude? Fut-il, au milieu d'une de ces distractions +et de ces affections qui occupaient sa vie, subitement atteint d'un de +ces coups mystérieux et terribles qui viennent quelquefois renverser, en +le frappant au coeur, l'homme que les catastrophes publiques +n'ébranleraient pas en le frappant dans son existence et dans sa +fortune? Nul n'aurait pu le dire; tout ce qu'on savait, c'est que, +lorsqu'il revint d'Italie, il était prêtre. + +En 1804, M. Myriel était curé de Brignolles. Il était déjà vieux, et +vivait dans une retraite profonde. + +Vers l'époque du couronnement, une petite affaire de sa cure, on ne sait +plus trop quoi, l'amena à Paris. Entre autres personnes puissantes, il +alla solliciter pour ses paroissiens M. le cardinal Fesch. Un jour que +l'empereur était venu faire visite à son oncle, le digne curé, qui +attendait dans l'antichambre, se trouva sur le passage de sa majesté. +Napoléon, se voyant regardé avec une certaine curiosité par ce +vieillard, se retourna, et dit brusquement: + +--Quel est ce bonhomme qui me regarde? + +--Sire, dit M. Myriel, vous regardez un bonhomme, et moi je regarde un +grand homme. Chacun de nous peut profiter. + +L'empereur, le soir même, demanda au cardinal le nom de ce curé, et +quelque temps après M. Myriel fut tout surpris d'apprendre qu'il était +nommé évêque de Digne. + +Qu'y avait-il de vrai, du reste, dans les récits qu'on faisait sur la +première partie de la vie de M. Myriel? Personne ne le savait. Peu de +familles avaient connu la famille Myriel avant la révolution. + +M. Myriel devait subir le sort de tout nouveau venu dans une petite +ville où il y a beaucoup de bouches qui parlent et fort peu de têtes qui +pensent. Il devait le subir, quoiqu'il fût évêque et parce qu'il était +évêque. Mais, après tout, les propos auxquels on mêlait son nom +n'étaient peut-être que des propos; du bruit, des mots, des paroles; +moins que des paroles, des _palabres_, comme dit l'énergique langue du +midi. diff --git a/bin/unit_tests/assets/textformat/french.win1252.lf.nobom.txt b/bin/unit_tests/assets/textformat/french.win1252.lf.nobom.txt new file mode 100644 index 000000000..2923d3797 --- /dev/null +++ b/bin/unit_tests/assets/textformat/french.win1252.lf.nobom.txt @@ -0,0 +1,66 @@ +En 1815, M. Charles-François-Bienvenu Myriel était évêque de Digne. +C'était un vieillard d'environ soixante-quinze ans; il occupait le siège +de Digne depuis 1806. + +Quoique ce détail ne touche en aucune manière au fond même de ce que +nous avons à raconter, il n'est peut-être pas inutile, ne fût-ce que +pour être exact en tout, d'indiquer ici les bruits et les propos qui +avaient couru sur son compte au moment où il était arrivé dans le +diocèse. Vrai ou faux, ce qu'on dit des hommes tient souvent autant de +place dans leur vie et surtout dans leur destinée que ce qu'ils font. M. +Myriel était fils d'un conseiller au parlement d'Aix; noblesse de robe. +On contait de lui que son père, le réservant pour hériter de sa charge, +l'avait marié de fort bonne heure, à dix-huit ou vingt ans, suivant un +usage assez répandu dans les familles parlementaires. Charles Myriel, +nonobstant ce mariage, avait, disait-on, beaucoup fait parler de lui. Il +était bien fait de sa personne, quoique d'assez petite taille, élégant, +gracieux, spirituel; toute la première partie de sa vie avait été donnée +au monde et aux galanteries. La révolution survint, les événements se +précipitèrent, les familles parlementaires décimées, chassées, traquées, +se dispersèrent. M. Charles Myriel, dès les premiers jours de la +révolution, émigra en Italie. Sa femme y mourut d'une maladie de +poitrine dont elle était atteinte depuis longtemps. Ils n'avaient point +d'enfants. Que se passa-t-il ensuite dans la destinée de M. Myriel? +L'écroulement de l'ancienne société française, la chute de sa propre +famille, les tragiques spectacles de 93, plus effrayants encore +peut-être pour les émigrés qui les voyaient de loin avec le +grossissement de l'épouvante, firent-ils germer en lui des idées de +renoncement et de solitude? Fut-il, au milieu d'une de ces distractions +et de ces affections qui occupaient sa vie, subitement atteint d'un de +ces coups mystérieux et terribles qui viennent quelquefois renverser, en +le frappant au coeur, l'homme que les catastrophes publiques +n'ébranleraient pas en le frappant dans son existence et dans sa +fortune? Nul n'aurait pu le dire; tout ce qu'on savait, c'est que, +lorsqu'il revint d'Italie, il était prêtre. + +En 1804, M. Myriel était curé de Brignolles. Il était déjà vieux, et +vivait dans une retraite profonde. + +Vers l'époque du couronnement, une petite affaire de sa cure, on ne sait +plus trop quoi, l'amena à Paris. Entre autres personnes puissantes, il +alla solliciter pour ses paroissiens M. le cardinal Fesch. Un jour que +l'empereur était venu faire visite à son oncle, le digne curé, qui +attendait dans l'antichambre, se trouva sur le passage de sa majesté. +Napoléon, se voyant regardé avec une certaine curiosité par ce +vieillard, se retourna, et dit brusquement: + +--Quel est ce bonhomme qui me regarde? + +--Sire, dit M. Myriel, vous regardez un bonhomme, et moi je regarde un +grand homme. Chacun de nous peut profiter. + +L'empereur, le soir même, demanda au cardinal le nom de ce curé, et +quelque temps après M. Myriel fut tout surpris d'apprendre qu'il était +nommé évêque de Digne. + +Qu'y avait-il de vrai, du reste, dans les récits qu'on faisait sur la +première partie de la vie de M. Myriel? Personne ne le savait. Peu de +familles avaient connu la famille Myriel avant la révolution. + +M. Myriel devait subir le sort de tout nouveau venu dans une petite +ville où il y a beaucoup de bouches qui parlent et fort peu de têtes qui +pensent. Il devait le subir, quoiqu'il fût évêque et parce qu'il était +évêque. Mais, après tout, les propos auxquels on mêlait son nom +n'étaient peut-être que des propos; du bruit, des mots, des paroles; +moins que des paroles, des _palabres_, comme dit l'énergique langue du +midi. diff --git a/bin/unit_tests/assets/textformat/japanese.shiftjis.crlf.nobom.txt b/bin/unit_tests/assets/textformat/japanese.shiftjis.crlf.nobom.txt new file mode 100644 index 000000000..a5ab83237 --- /dev/null +++ b/bin/unit_tests/assets/textformat/japanese.shiftjis.crlf.nobom.txt @@ -0,0 +1,48 @@ +�@Œá”y‚킪‚͂¢‚͔L‚ł ‚é�B–¼‘O‚͂܂¾–³‚¢�B + +�@‚ǂ±‚Ő¶‚ꂽ‚©‚Ƃñ‚ƌ©“–‚¯‚ñ‚Ƃ¤‚ª‚‚©‚ʁB‰½‚łà”–ˆÂ¢‚¶‚߂¶‚߂µ‚½�Š‚Ńjƒƒ�[ƒjƒƒ�[‹ƒ‚¢‚Ă¢‚½ +Ž–‚¾‚¯‚͋L‰¯‚µ‚Ă¢‚é�BŒá”y‚͂±‚±‚Ŏn‚߂ĐlŠԂƂ¢‚¤‚à‚̂ðŒ©‚½�B‚µ‚©‚à‚ ‚Ƃŕ·‚­‚Ƃ»‚ê‚͏‘�¶‚Ƃ¢ +‚¤�lŠԒ†‚ňê”Ôàֈ«‚ǂ¤‚ ‚­‚Ȏ푰‚ł ‚Á‚½‚»‚¤‚¾�B‚±‚̏‘�¶‚Ƃ¢‚¤‚͎̂ž�X‰ä�X‚ð•߂‚©‚܂¦‚ĎςɂÄ +�H‚¤‚Ƃ¢‚¤˜b‚ł ‚é�B‚µ‚©‚µ‚»‚̓–Žž‚͉½‚Ƃ¢‚¤�l‚à‚Ȃ©‚Á‚½‚©‚ç•ʒi‹°‚µ‚¢‚ƂàŽv‚í‚Ȃ©‚Á‚½�B‚½‚¾”Þ +‚̏¶‚Ă̂Ђç‚ɍڂ¹‚ç‚ê‚ăX�[‚Ǝ�‚¿�グ‚ç‚ꂽŽž‰½‚¾‚©ƒtƒ�ƒtƒ�‚µ‚½Š´‚¶‚ª‚ ‚Á‚½‚΂©‚è‚ł ‚é�B�¶‚Ì +�ã‚ŏ­‚µ—Ž‚¿‚‚¢‚ď‘�¶‚̊ç‚ðŒ©‚½‚̂ª‚¢‚í‚ä‚é�lŠԂƂ¢‚¤‚à‚̂̌©Žn‚݂͂¶‚߂ł ‚낤�B‚±‚̎ž–­‚Ȃà +‚̂¾‚Ǝv‚Á‚½Š´‚¶‚ª�¡‚łàŽc‚Á‚Ă¢‚é�B‘æˆê–тð‚à‚Á‚đ•�ü‚³‚ê‚ׂ«‚͂¸‚̊炪‚‚é‚‚邵‚Ă܂邪òŠÊ +‚₩‚񂾁B‚»‚̌ゲ”L‚ɂà‚¾‚¢‚Ԉ§‚ ‚Á‚½‚ª‚±‚ñ‚ȕЗւ©‚½‚í‚ɂ͈ê“x‚à�o‰ï‚ł­‚킵‚½Ž–‚ª‚Ȃ¢�B‚̂Ý +‚Ȃ炸Šç‚̐^’†‚ª‚ ‚܂è‚ɓˋN‚µ‚Ă¢‚é�B‚»‚¤‚µ‚Ă»‚̌Š‚̒†‚©‚玞�X‚Ղ¤‚Ղ¤‚ƉŒ‚¯‚ނè‚𐁂­�B‚ǂ¤ +‚àˆô‚ނ¹‚ۂ­‚ĎÀ‚Ɏã‚Á‚½�B‚±‚ꂪ�lŠԂ̈ù‚މŒ‘�‚½‚΂±‚Ƃ¢‚¤‚à‚̂ł ‚鎖‚͂悤‚₭‚±‚̍ ’m‚Á‚½�B + +�@‚±‚̏‘�¶‚̏¶‚̗ ‚¤‚¿‚łµ‚΂炭‚͂悢�SŽ�‚ɍ¿‚Á‚è‚Á‚½‚ª�A‚µ‚΂炭‚·‚é‚Ɣñ�í‚ȑ¬—͂ʼn^“]‚µŽn +‚߂½�B�‘�¶‚ª“®‚­‚̂©Ž©•ª‚¾‚¯‚ª“®‚­‚̂©•ª‚ç‚Ȃ¢‚ª–³ˆÂނâ‚݂ɊႪ‰ô‚é�B‹¹‚ªˆ«‚­‚Ȃé�B“ž’ê‚Ƃ¤‚Ä +‚¢�•‚©‚ç‚Ȃ¢‚Ǝv‚Á‚Ă¢‚é‚ƁA‚ǂ³‚è‚Ɖ¹‚ª‚µ‚ĊႩ‚ç‰΂ª�o‚½�B‚»‚ê‚܂ł͋L‰¯‚µ‚Ă¢‚邪‚ ‚Ƃ͉½‚Ì +Ž–‚â‚炢‚­‚ç�l‚¦�o‚»‚¤‚Ƃµ‚Ăà•ª‚ç‚Ȃ¢�B + +�@‚ӂƋC‚ª•t‚¢‚Č©‚é‚Ə‘�¶‚͂¢‚Ȃ¢�B‚½‚­‚³‚񂨂Á‚½ŒZ’킪ˆê•D‚҂«‚àŒ©‚¦‚ʁBŠ̐S‚©‚񂶂ñ‚̕ê�e‚³ +‚¦Žp‚ð‰B‚µ‚õ‚܂Á‚½�B‚»‚̏㍡‚¢‚܂܂ł̏Š‚Ƃ͈á‚Á‚˳ˆÂނâ‚݂ɖ¾‚邢�BŠá‚𖾂¢‚Ă¢‚ç‚ê‚ʂ­‚ç +‚¢‚¾�B‚͂Ăȉ½‚łà—eŽq‚悤‚·‚ª‚¨‚©‚µ‚¢‚ƁA‚̂»‚̂»”‡‚͂¢�o‚µ‚Č©‚é‚Ɣñ�í‚ɒɂ¢�BŒá”y‚͘m‚í‚ç‚Ì +�ォ‚ç‹}‚ɍùŒ´‚̒†‚֊ü‚Ăç‚ꂽ‚̂ł ‚é�B + +�@‚悤‚₭‚̎v‚¢‚ōùŒ´‚𔇂¢�o‚·‚ƌü‚¤‚ɑ傫‚Ȓr‚ª‚ ‚é�BŒá”y‚͒r‚̑O‚ɍ¿‚Á‚Ăǂ¤‚µ‚½‚ç‚悩‚낤 +‚ƍl‚¦‚Č©‚½�B•ʂɂ±‚ê‚Ƃ¢‚¤•ª•ʂӂñ‚ׂ‚à�o‚Ȃ¢�B‚µ‚΂炭‚µ‚ċƒ‚¢‚½‚珑�¶‚ª‚܂½Œ}‚ɗˆ‚Ă­‚ê‚é +‚©‚ƍl‚¦•t‚¢‚½�Bƒjƒƒ�[�Aƒjƒƒ�[‚ƎŽ‚݂ɂâ‚Á‚Č©‚½‚ª’N‚à—ˆ‚Ȃ¢�B‚»‚̂¤‚¿’r‚̏ã‚ð‚³‚炳‚ç‚ƕ—‚ª“n +‚Á‚ēú‚ª•é‚ꂩ‚©‚é�B• ‚ª”ñ�í‚Ɍ¸‚Á‚ėˆ‚½�B‹ƒ‚«‚½‚­‚Ăà�º‚ª�o‚Ȃ¢�BŽd•û‚ª‚Ȃ¢�A‰½‚łà‚悢‚©‚ç�H +•¨‚­‚¢‚à‚̂̂ ‚鏊‚܂ł ‚邱‚¤‚ƌˆ�S‚ð‚µ‚Ă»‚ë‚肻‚ë‚肃r‚ð�¶‚Ђ¾‚è‚ɉô‚èŽn‚߂½�B‚ǂ¤‚à”ñ�í‚É +‹ꂵ‚¢�B‚»‚±‚ð‰䖝‚µ‚˳—�‚â‚è‚ɔ‡‚͂Á‚čs‚­‚Ƃ悤‚₭‚̎–‚ʼn½‚ƂȂ­�lŠԏL‚¢�Š‚֏o‚½�B‚±‚±‚֔‡ +“ü‚͂¢‚Á‚½‚ç�A‚ǂ¤‚ɂ©‚Ȃé‚Ǝv‚Á‚Ē|Š_‚̕ö‚­‚¸‚ꂽŒŠ‚©‚ç�A‚Ƃ ‚é“@“à‚ɂà‚®‚荞‚񂾁B‰�‚͕sŽv‹c +‚Ȃà‚̂ŁA‚à‚µ‚±‚̒|Š_‚ª”j‚ê‚Ă¢‚Ȃ©‚Á‚½‚Ȃç�AŒá”y‚͂‚¢‚ɘH–T‚ë‚ڂ¤‚ɉ쎀‚ª‚µ‚µ‚½‚©‚à’m‚ê‚ñ‚Ì +‚ł ‚é�BˆêŽ÷‚̈ü‚Ƃ͂悭‰]‚¢‚Á‚½‚à‚̂¾�B‚±‚̊_�ª‚̌Š‚͍¡“ú‚±‚ñ‚ɂ¿‚ɎŠ‚é‚܂Ōá”y‚ª—׉ƂƂȂè‚Ì +ŽO–тð–K–₷‚鎞‚̒ʘH‚ɂȂÁ‚Ă¢‚é�B‚³‚ē@‚₵‚«‚ւ͔E‚эž‚񂾂à‚̂̂±‚ꂩ‚ç�æ‚ǂ¤‚µ‚đP‚¢‚¢‚© +•ª‚ç‚Ȃ¢�B‚»‚̂¤‚¿‚Ɉ­‚Ȃé�A• ‚͌¸‚é�AЦ‚³‚͊¦‚µ�A‰J‚ª�~‚Á‚ėˆ‚é‚Ƃ¢‚¤Žn––‚łà‚¤ˆꍏ‚̗P—\‚ä +‚¤‚悪�o—ˆ‚Ȃ­‚ȂÁ‚½�BŽd•û‚ª‚Ȃ¢‚©‚ç‚Ƃɂ©‚­–¾‚邭‚Ēg‚©‚»‚¤‚ȕû‚֕û‚ւƂ ‚邢‚čs‚­�B�¡‚©‚ç�l +‚¦‚é‚Ƃ»‚̎ž‚͂·‚łɉƂ̓à‚ɔ‡“ü‚Á‚è‚Á‚½‚̂¾�B‚±‚±‚Ōá”y‚͔ނ©‚̏‘�¶ˆȊO‚̐lŠԂð�Ăь©‚é‚ׂ« +‹@‰ï‚ɑ˜‹ö‚»‚¤‚®‚¤‚µ‚½‚̂ł ‚é�B‘æˆê‚Ɉ§‚Á‚½‚̂ª‚¨‚³‚ñ‚ł ‚é�B‚±‚ê‚͑O‚̏‘�¶‚æ‚èˆê‘w—�–\‚ȕû‚Å +Œá”y‚ðŒ©‚é‚â”ۂ₢‚«‚Ȃèèò‹؂­‚т·‚¶‚ð‚‚©‚ñ‚ŕ\‚֝e‚ق¤‚è�o‚µ‚½�B‚¢‚₱‚ê‚͑ʖڂ¾‚Ǝv‚Á‚½‚©‚ç +Šá‚ð‚˂ԂÁ‚ĉ^‚ð“V‚ɔC‚¹‚Ă¢‚½�B‚µ‚©‚µ‚Ђà‚¶‚¢‚̂Ɗ¦‚¢‚̂ɂ͂ǂ¤‚µ‚Ăà‰䖝‚ª�o—ˆ‚ñ�BŒá”y‚͍ĂÑ +‚¨‚³‚ñ‚̌„‚·‚«‚ðŒ©‚đ䏊‚֔‡‚͂¢�゠‚ª‚Á‚½�B‚·‚é‚ƊԂà‚Ȃ­‚܂½“Š‚°�o‚³‚ꂽ�BŒá”y‚͓Š‚°�o‚³‚ê‚Ä +‚͔‡‚¢�ã‚è�A”‡‚¢�ã‚Á‚Ă͓Š‚°�o‚³‚ê�A‰½‚łà“¯‚¶Ž–‚ðŽlŒܕՌJ‚è•Ԃµ‚½‚̂ð‹L‰¯‚µ‚Ă¢‚é�B‚»‚̎ž‚ɂ¨ +‚³‚ñ‚Ɖ]‚¤Ž҂͂‚­‚­‚¢‚â‚ɂȂÁ‚½�B‚±‚̊Ԃ¨‚³‚ñ‚̎O”n‚³‚ñ‚܂ð˜÷‚ʂ·‚ñ‚ł±‚̕ԕñ‚ð‚µ‚Ăâ‚Á‚Ă© +‚ç�A‚â‚Á‚Ƌ¹‚Ìá|‚‚©‚¦‚ª‰º‚肽�BŒá”y‚ª�Ōã‚ɂ‚܂ݏo‚³‚ê‚悤‚Ƃµ‚½‚Ƃ«‚ɁA‚±‚̉Ƃ¤‚¿‚̎å�l‚ª‘› +�X‚µ‚¢‰½‚¾‚Ƃ¢‚¢‚Ȃª‚ç�o‚ėˆ‚½�B‰º�—‚͌á”y‚ð‚Ԃ牺‚°‚Ďå�l‚̕û‚֌ü‚¯‚ñ‚̏h‚â‚ǂȂµ‚̏¬”L‚ª‚¢ +‚­‚ç�o‚µ‚Ăà�o‚µ‚ĂàŒä‘䏊‚¨‚¾‚¢‚ǂ±‚ë‚֏゠‚ª‚Á‚ėˆ‚č¢‚è‚܂·‚Ƃ¢‚¤�BŽå�l‚͕@‚̉º‚̍•‚¢–тð”Q +‚Ђ˂è‚Ȃª‚çŒá”y‚̊ç‚ð‚µ‚΂炭’­‚Ȃª‚߂è‚Á‚½‚ª�A‚₪‚Ă»‚ñ‚Ȃç“à‚֒u‚¢‚Ăâ‚ê‚Ƃ¢‚Á‚½‚܂܉œ‚Ö +”‡“ü‚͂¢‚Á‚õ‚܂Á‚½�BŽå�l‚͂ ‚܂èŒû‚𕷂©‚ʐl‚ƌ©‚¦‚½�B‰º�—‚͌û�ɂ­‚₵‚»‚¤‚Ɍá”y‚ð‘䏊‚֝e‚Ù +‚¤‚è�o‚µ‚½�B‚©‚­‚µ‚Čá”y‚͂‚¢‚ɂ±‚̉Ƃ¤‚¿‚ðŽ©•ª‚̏Z‰Ƃ·‚݂©‚Ƌɂ«‚߂鎖‚ɂµ‚½‚̂ł ‚é�B diff --git a/bin/unit_tests/assets/textformat/japanese.shiftjis.lf.nobom.txt b/bin/unit_tests/assets/textformat/japanese.shiftjis.lf.nobom.txt new file mode 100644 index 000000000..acff03e7c --- /dev/null +++ b/bin/unit_tests/assets/textformat/japanese.shiftjis.lf.nobom.txt @@ -0,0 +1,48 @@ +�@Œá”y‚킪‚͂¢‚͔L‚ł ‚é�B–¼‘O‚͂܂¾–³‚¢�B + +�@‚ǂ±‚Ő¶‚ꂽ‚©‚Ƃñ‚ƌ©“–‚¯‚ñ‚Ƃ¤‚ª‚‚©‚ʁB‰½‚łà”–ˆÂ¢‚¶‚߂¶‚߂µ‚½�Š‚Ńjƒƒ�[ƒjƒƒ�[‹ƒ‚¢‚Ă¢‚½ +Ž–‚¾‚¯‚͋L‰¯‚µ‚Ă¢‚é�BŒá”y‚͂±‚±‚Ŏn‚߂ĐlŠԂƂ¢‚¤‚à‚̂ðŒ©‚½�B‚µ‚©‚à‚ ‚Ƃŕ·‚­‚Ƃ»‚ê‚͏‘�¶‚Ƃ¢ +‚¤�lŠԒ†‚ňê”Ôàֈ«‚ǂ¤‚ ‚­‚Ȏ푰‚ł ‚Á‚½‚»‚¤‚¾�B‚±‚̏‘�¶‚Ƃ¢‚¤‚͎̂ž�X‰ä�X‚ð•߂‚©‚܂¦‚ĎςɂÄ +�H‚¤‚Ƃ¢‚¤˜b‚ł ‚é�B‚µ‚©‚µ‚»‚̓–Žž‚͉½‚Ƃ¢‚¤�l‚à‚Ȃ©‚Á‚½‚©‚ç•ʒi‹°‚µ‚¢‚ƂàŽv‚í‚Ȃ©‚Á‚½�B‚½‚¾”Þ +‚̏¶‚Ă̂Ђç‚ɍڂ¹‚ç‚ê‚ăX�[‚Ǝ�‚¿�グ‚ç‚ꂽŽž‰½‚¾‚©ƒtƒ�ƒtƒ�‚µ‚½Š´‚¶‚ª‚ ‚Á‚½‚΂©‚è‚ł ‚é�B�¶‚Ì +�ã‚ŏ­‚µ—Ž‚¿‚‚¢‚ď‘�¶‚̊ç‚ðŒ©‚½‚̂ª‚¢‚í‚ä‚é�lŠԂƂ¢‚¤‚à‚̂̌©Žn‚݂͂¶‚߂ł ‚낤�B‚±‚̎ž–­‚Ȃà +‚̂¾‚Ǝv‚Á‚½Š´‚¶‚ª�¡‚łàŽc‚Á‚Ă¢‚é�B‘æˆê–тð‚à‚Á‚đ•�ü‚³‚ê‚ׂ«‚͂¸‚̊炪‚‚é‚‚邵‚Ă܂邪òŠÊ +‚₩‚񂾁B‚»‚̌ゲ”L‚ɂà‚¾‚¢‚Ԉ§‚ ‚Á‚½‚ª‚±‚ñ‚ȕЗւ©‚½‚í‚ɂ͈ê“x‚à�o‰ï‚ł­‚킵‚½Ž–‚ª‚Ȃ¢�B‚̂Ý +‚Ȃ炸Šç‚̐^’†‚ª‚ ‚܂è‚ɓˋN‚µ‚Ă¢‚é�B‚»‚¤‚µ‚Ă»‚̌Š‚̒†‚©‚玞�X‚Ղ¤‚Ղ¤‚ƉŒ‚¯‚ނè‚𐁂­�B‚ǂ¤ +‚àˆô‚ނ¹‚ۂ­‚ĎÀ‚Ɏã‚Á‚½�B‚±‚ꂪ�lŠԂ̈ù‚މŒ‘�‚½‚΂±‚Ƃ¢‚¤‚à‚̂ł ‚鎖‚͂悤‚₭‚±‚̍ ’m‚Á‚½�B + +�@‚±‚̏‘�¶‚̏¶‚̗ ‚¤‚¿‚łµ‚΂炭‚͂悢�SŽ�‚ɍ¿‚Á‚è‚Á‚½‚ª�A‚µ‚΂炭‚·‚é‚Ɣñ�í‚ȑ¬—͂ʼn^“]‚µŽn +‚߂½�B�‘�¶‚ª“®‚­‚̂©Ž©•ª‚¾‚¯‚ª“®‚­‚̂©•ª‚ç‚Ȃ¢‚ª–³ˆÂނâ‚݂ɊႪ‰ô‚é�B‹¹‚ªˆ«‚­‚Ȃé�B“ž’ê‚Ƃ¤‚Ä +‚¢�•‚©‚ç‚Ȃ¢‚Ǝv‚Á‚Ă¢‚é‚ƁA‚ǂ³‚è‚Ɖ¹‚ª‚µ‚ĊႩ‚ç‰΂ª�o‚½�B‚»‚ê‚܂ł͋L‰¯‚µ‚Ă¢‚邪‚ ‚Ƃ͉½‚Ì +Ž–‚â‚炢‚­‚ç�l‚¦�o‚»‚¤‚Ƃµ‚Ăà•ª‚ç‚Ȃ¢�B + +�@‚ӂƋC‚ª•t‚¢‚Č©‚é‚Ə‘�¶‚͂¢‚Ȃ¢�B‚½‚­‚³‚񂨂Á‚½ŒZ’킪ˆê•D‚҂«‚àŒ©‚¦‚ʁBŠ̐S‚©‚񂶂ñ‚̕ê�e‚³ +‚¦Žp‚ð‰B‚µ‚õ‚܂Á‚½�B‚»‚̏㍡‚¢‚܂܂ł̏Š‚Ƃ͈á‚Á‚˳ˆÂނâ‚݂ɖ¾‚邢�BŠá‚𖾂¢‚Ă¢‚ç‚ê‚ʂ­‚ç +‚¢‚¾�B‚͂Ăȉ½‚łà—eŽq‚悤‚·‚ª‚¨‚©‚µ‚¢‚ƁA‚̂»‚̂»”‡‚͂¢�o‚µ‚Č©‚é‚Ɣñ�í‚ɒɂ¢�BŒá”y‚͘m‚í‚ç‚Ì +�ォ‚ç‹}‚ɍùŒ´‚̒†‚֊ü‚Ăç‚ꂽ‚̂ł ‚é�B + +�@‚悤‚₭‚̎v‚¢‚ōùŒ´‚𔇂¢�o‚·‚ƌü‚¤‚ɑ傫‚Ȓr‚ª‚ ‚é�BŒá”y‚͒r‚̑O‚ɍ¿‚Á‚Ăǂ¤‚µ‚½‚ç‚悩‚낤 +‚ƍl‚¦‚Č©‚½�B•ʂɂ±‚ê‚Ƃ¢‚¤•ª•ʂӂñ‚ׂ‚à�o‚Ȃ¢�B‚µ‚΂炭‚µ‚ċƒ‚¢‚½‚珑�¶‚ª‚܂½Œ}‚ɗˆ‚Ă­‚ê‚é +‚©‚ƍl‚¦•t‚¢‚½�Bƒjƒƒ�[�Aƒjƒƒ�[‚ƎŽ‚݂ɂâ‚Á‚Č©‚½‚ª’N‚à—ˆ‚Ȃ¢�B‚»‚̂¤‚¿’r‚̏ã‚ð‚³‚炳‚ç‚ƕ—‚ª“n +‚Á‚ēú‚ª•é‚ꂩ‚©‚é�B• ‚ª”ñ�í‚Ɍ¸‚Á‚ėˆ‚½�B‹ƒ‚«‚½‚­‚Ăà�º‚ª�o‚Ȃ¢�BŽd•û‚ª‚Ȃ¢�A‰½‚łà‚悢‚©‚ç�H +•¨‚­‚¢‚à‚̂̂ ‚鏊‚܂ł ‚邱‚¤‚ƌˆ�S‚ð‚µ‚Ă»‚ë‚肻‚ë‚肃r‚ð�¶‚Ђ¾‚è‚ɉô‚èŽn‚߂½�B‚ǂ¤‚à”ñ�í‚É +‹ꂵ‚¢�B‚»‚±‚ð‰䖝‚µ‚˳—�‚â‚è‚ɔ‡‚͂Á‚čs‚­‚Ƃ悤‚₭‚̎–‚ʼn½‚ƂȂ­�lŠԏL‚¢�Š‚֏o‚½�B‚±‚±‚֔‡ +“ü‚͂¢‚Á‚½‚ç�A‚ǂ¤‚ɂ©‚Ȃé‚Ǝv‚Á‚Ē|Š_‚̕ö‚­‚¸‚ꂽŒŠ‚©‚ç�A‚Ƃ ‚é“@“à‚ɂà‚®‚荞‚񂾁B‰�‚͕sŽv‹c +‚Ȃà‚̂ŁA‚à‚µ‚±‚̒|Š_‚ª”j‚ê‚Ă¢‚Ȃ©‚Á‚½‚Ȃç�AŒá”y‚͂‚¢‚ɘH–T‚ë‚ڂ¤‚ɉ쎀‚ª‚µ‚µ‚½‚©‚à’m‚ê‚ñ‚Ì +‚ł ‚é�BˆêŽ÷‚̈ü‚Ƃ͂悭‰]‚¢‚Á‚½‚à‚̂¾�B‚±‚̊_�ª‚̌Š‚͍¡“ú‚±‚ñ‚ɂ¿‚ɎŠ‚é‚܂Ōá”y‚ª—׉ƂƂȂè‚Ì +ŽO–тð–K–₷‚鎞‚̒ʘH‚ɂȂÁ‚Ă¢‚é�B‚³‚ē@‚₵‚«‚ւ͔E‚эž‚񂾂à‚̂̂±‚ꂩ‚ç�æ‚ǂ¤‚µ‚đP‚¢‚¢‚© +•ª‚ç‚Ȃ¢�B‚»‚̂¤‚¿‚Ɉ­‚Ȃé�A• ‚͌¸‚é�AЦ‚³‚͊¦‚µ�A‰J‚ª�~‚Á‚ėˆ‚é‚Ƃ¢‚¤Žn––‚łà‚¤ˆꍏ‚̗P—\‚ä +‚¤‚悪�o—ˆ‚Ȃ­‚ȂÁ‚½�BŽd•û‚ª‚Ȃ¢‚©‚ç‚Ƃɂ©‚­–¾‚邭‚Ēg‚©‚»‚¤‚ȕû‚֕û‚ւƂ ‚邢‚čs‚­�B�¡‚©‚ç�l +‚¦‚é‚Ƃ»‚̎ž‚͂·‚łɉƂ̓à‚ɔ‡“ü‚Á‚è‚Á‚½‚̂¾�B‚±‚±‚Ōá”y‚͔ނ©‚̏‘�¶ˆȊO‚̐lŠԂð�Ăь©‚é‚ׂ« +‹@‰ï‚ɑ˜‹ö‚»‚¤‚®‚¤‚µ‚½‚̂ł ‚é�B‘æˆê‚Ɉ§‚Á‚½‚̂ª‚¨‚³‚ñ‚ł ‚é�B‚±‚ê‚͑O‚̏‘�¶‚æ‚èˆê‘w—�–\‚ȕû‚Å +Œá”y‚ðŒ©‚é‚â”ۂ₢‚«‚Ȃèèò‹؂­‚т·‚¶‚ð‚‚©‚ñ‚ŕ\‚֝e‚ق¤‚è�o‚µ‚½�B‚¢‚₱‚ê‚͑ʖڂ¾‚Ǝv‚Á‚½‚©‚ç +Šá‚ð‚˂ԂÁ‚ĉ^‚ð“V‚ɔC‚¹‚Ă¢‚½�B‚µ‚©‚µ‚Ђà‚¶‚¢‚̂Ɗ¦‚¢‚̂ɂ͂ǂ¤‚µ‚Ăà‰䖝‚ª�o—ˆ‚ñ�BŒá”y‚͍ĂÑ +‚¨‚³‚ñ‚̌„‚·‚«‚ðŒ©‚đ䏊‚֔‡‚͂¢�゠‚ª‚Á‚½�B‚·‚é‚ƊԂà‚Ȃ­‚܂½“Š‚°�o‚³‚ꂽ�BŒá”y‚͓Š‚°�o‚³‚ê‚Ä +‚͔‡‚¢�ã‚è�A”‡‚¢�ã‚Á‚Ă͓Š‚°�o‚³‚ê�A‰½‚łà“¯‚¶Ž–‚ðŽlŒܕՌJ‚è•Ԃµ‚½‚̂ð‹L‰¯‚µ‚Ă¢‚é�B‚»‚̎ž‚ɂ¨ +‚³‚ñ‚Ɖ]‚¤Ž҂͂‚­‚­‚¢‚â‚ɂȂÁ‚½�B‚±‚̊Ԃ¨‚³‚ñ‚̎O”n‚³‚ñ‚܂ð˜÷‚ʂ·‚ñ‚ł±‚̕ԕñ‚ð‚µ‚Ăâ‚Á‚Ă© +‚ç�A‚â‚Á‚Ƌ¹‚Ìá|‚‚©‚¦‚ª‰º‚肽�BŒá”y‚ª�Ōã‚ɂ‚܂ݏo‚³‚ê‚悤‚Ƃµ‚½‚Ƃ«‚ɁA‚±‚̉Ƃ¤‚¿‚̎å�l‚ª‘› +�X‚µ‚¢‰½‚¾‚Ƃ¢‚¢‚Ȃª‚ç�o‚ėˆ‚½�B‰º�—‚͌á”y‚ð‚Ԃ牺‚°‚Ďå�l‚̕û‚֌ü‚¯‚ñ‚̏h‚â‚ǂȂµ‚̏¬”L‚ª‚¢ +‚­‚ç�o‚µ‚Ăà�o‚µ‚ĂàŒä‘䏊‚¨‚¾‚¢‚ǂ±‚ë‚֏゠‚ª‚Á‚ėˆ‚č¢‚è‚܂·‚Ƃ¢‚¤�BŽå�l‚͕@‚̉º‚̍•‚¢–тð”Q +‚Ђ˂è‚Ȃª‚çŒá”y‚̊ç‚ð‚µ‚΂炭’­‚Ȃª‚߂è‚Á‚½‚ª�A‚₪‚Ă»‚ñ‚Ȃç“à‚֒u‚¢‚Ăâ‚ê‚Ƃ¢‚Á‚½‚܂܉œ‚Ö +”‡“ü‚͂¢‚Á‚õ‚܂Á‚½�BŽå�l‚͂ ‚܂èŒû‚𕷂©‚ʐl‚ƌ©‚¦‚½�B‰º�—‚͌û�ɂ­‚₵‚»‚¤‚Ɍá”y‚ð‘䏊‚֝e‚Ù +‚¤‚è�o‚µ‚½�B‚©‚­‚µ‚Čá”y‚͂‚¢‚ɂ±‚̉Ƃ¤‚¿‚ðŽ©•ª‚̏Z‰Ƃ·‚݂©‚Ƌɂ«‚߂鎖‚ɂµ‚½‚̂ł ‚é�B diff --git a/bin/unit_tests/assets/textformat/japanese.utf16be.crlf.bom.txt b/bin/unit_tests/assets/textformat/japanese.utf16be.crlf.bom.txt new file mode 100644 index 0000000000000000000000000000000000000000..eb2412f06ec4029b9aaa83aba0d99025472135b9 GIT binary patch literal 4164 zcmZ9Pe`uU{9mnrdT4-mLDyW@|(!rFjPCf$}t5cD1WU;wEmt2xvuW53Zwz+$HPxf5X zG)?-${5X@5yGzV@v01t?s}w}X5dYAz4n<`1pOra~6@-cd%Z3Qr;{KVPY`#99?{gs? z;mLE)_xXN5Ki{AC=kt8@vBdhmy|PbMBq?P{NO^p}6s2A2($=>#eTcPb$&c;jOSFlatab#fd$#Bsu94UslDh)^okmqrapBStnQ@m9|tr(kct{g=dj)Smx}?NbcBo zSidf}}lgf7tigyDb5Z_iu)jzmJ1(XF}ux&4n6BVB1JDYQ5rv$e-WQLIFpjn`LB(~6mE~%y;3VxICW_N=3mHY!_r}egt9r@fv^C3LGL~KGiEma9tw#xu_ zUAab7{o`>N_I60x)^de*bmftKLvGte4uFKzwd_Q0XnEKn#iP3oU5b`zeis*Bnt9AL%;VXr zdv{{p8BS?9bs-AZ0H$^fRgS+)dq&O)1uh8rV!? zJ@r83XG}wh7$3okaB>fb(uhtI%i#Rn@+2oBFAPcggcaw{NXSkyttgU7BBPf-mId{* zoNe|UKwq0;(lk{1e#iQNe2>+_z!eE{k6P9=o=cLn*oW)?k=e2A_rGh|>~+Y(&(LKR zyUVhOmU(1==JhR;?>ZT(!L-CSP_D=d7vEy{FsC!1qsl2gpUAxivVu&v<>#PDNJ@NT zPnOvG&khYeE~Unv^z%||bp7D(lF42-4RhGmW*ADQZy+(0uDO4vw~>n;*;wJZY7tJ3 z?S(gHv3N#;$!|(>=tITB><5yhUa3@lO3TnCeC=>mCyDegG_H2u;mXC|$HtT3riOLz zlOr;LM0TDEB-wLU?IJTvWUlxL-qC#eR;#Wi>ey2y|0$_bx1F3-j_@thl?~fBv*m>N zqhBCPf8kUCjv_)91La$Xq#V-v!JoymCz0F3?$|_K&Vca>Cpwi&XJ5#@hQ+H?)T)HR zo7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Fh4(%pPHk`aINZ$F5mUTI-b`AiD|xfcn+3%~qh@lb@--d;Hr zsVIa4(47sd2#*(l=2J5P`EZCj@P08M*Hf%i{*%bsP!@6Ns`JV(BE*#$(!A0vLOlS@ z7_iOCdm90jiKk}xq&*%$hKVIrqJVfmtvk$T7HhGPu8Epa#x5`LsK|k0FZMFCS#@Gb zT;KPrx`w2<2Gy-R8$T$SH;m}=Jq4|h*g6poj|xH zk3gr17?os9#mKyQRsG~~C%32QHMr!8N0ct4$? z?VYh8e4x6N!ZUslSB0^vC@|j`47P@Mn?PY9CIyxCd(d_m)pi}ntjg(k8F8wv8I%QH4>0(>)T19 zSH(_RIIMc`W7SZM8sB3%a)G*BjO~ zXGuBc#a_R%(AG|u+qP_2TIW4-c`*;h)_~95WDIBDO~@9O~xu4^7MU!1q@Bu-^G zL-?SfXCsb0F|};Gs4Vz^3AxQ0;<;KW+Z?BFSs>xZU8*AMVcqhBdpMSlln1MXBPup2Wb~}s< z=O>I`TZ}KGEYKUycQt6wSEFTMN)4^blbinekW3+}0aPMq-c|UXU7nSfN9N&270A+; zPV6Xy<+Swr*1uk8Pk6+MF|gA-kLinO_?s;`nScfuN&M4FsORKKjcGf~(a%&&dV-{^NH0Z_O|!zK!a-<}_T!3MYNO zQB+X-v*IjJFUnvPEs}Sf%F>Bh6$6z)_n`d~98th~CZ4Ox4rZI7BHyWR8hqF8Rr%5A z?ezZz(=b(+ieT@dsoBoTWDNVOlj=sCG_Q4^A;LO;Ej5ul5(;f66UaEHlL|6lh LZS35yHaz=(m`nth literal 0 HcmV?d00001 diff --git a/bin/unit_tests/assets/textformat/japanese.utf16le.crlf.nobom.txt b/bin/unit_tests/assets/textformat/japanese.utf16le.crlf.nobom.txt new file mode 100644 index 0000000000000000000000000000000000000000..6dabfd12600f6d54eb8f33a6faec45fc3005ab6f GIT binary patch literal 4162 zcmZ8kZD?EP6}B7_h`V-VgKft6XI zt{pp*Wlb*DhbK**zgoJi1j-i5*pJOLVPlMRe-gSvX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nU=YMp>K^&Oo(Y0)0j$10GNUe?Ybqgm)&~5z??91S zOAqKfXS5_T?Z|e@6|&;d=17EIY7O`Dz-d&g&t+)0o)dSiFC<;X)0V76CY45Vaxo1% ze+jxJXR3-0u)YLSw>C`>-@QK>z5hEmc{w> zgfm(V8uQgy8CX&$tMcS#a4sy9h^P;B$BA_ne&?2F1#Z_3; z=n*H=(DAymwVs6Mj3guP_p;J;&oQk|prW&`=a1Dj&d*^m-j=nYDB|Fp$Vl|L`}a6E z6jUcMttxoOo?=>zr0~E_PZd8C>%-jFl6%ko$m(v6%~$1}hR#*%|K3Y9TO8!dG}z;F zsMdfSEEa%sSVnLWQ(a?Ptz21M^CCTLy}rd=^N4n)XA~J?W~eOhG#>BMTC4j7>x-(w zf0!?duKan5nd|~04%4&~A@SooQHdRK(^El6y z&z?Iu$u|bm;5?=026kBX)RMevGs9=qbk6t66{wDvXW9h=o~K^P2hB?<`&q|JF3);hUqbVNSDU+~JJQH-QT3d`8>_Dnl78 zqCIkr6V^x)UK!K?-C-V_#TY-{39+gwJD64mihTFIVey@~OXWr5w$uA3OtVy0R==}{ zqvkj3kovY?iPSJ6q - + EnvironmentId @@ -1390,6 +1390,28 @@ false %{buildDir}/../../bin + + true + 0 + true + true + + 2 + + false + -e cpu-cycles --call-graph dwarf,4096 -F 250 + %{buildDir}/../../bin/unit_tests/eepp-unit_tests-debug + eepp-unit_tests-debug + ProjectExplorer.CustomExecutableRunConfiguration + + true + 0 + false + 1 + false + false + %{buildDir}/../../bin + true 0 @@ -1539,7 +1561,7 @@ false %{buildDir}../../../bin/ - 28 + 29 diff --git a/projects/linux/ee.files b/projects/linux/ee.files index 91c9fc1af..78771cc75 100644 --- a/projects/linux/ee.files +++ b/projects/linux/ee.files @@ -1433,6 +1433,9 @@ ../../src/tests/test_everything/test.cpp ../../src/tests/test_everything/test.hpp ../../src/tests/ui_perf_test/ui_perf_test.cpp +../../src/tests/unit_tests/main.cpp +../../src/tests/unit_tests/textformat.cpp +../../src/tests/unit_tests/utest.h ../../src/thirdparty/SOIL2/src/SOIL2/etc1_utils.c ../../src/thirdparty/SOIL2/src/SOIL2/etc1_utils.h ../../src/thirdparty/SOIL2/src/SOIL2/image_DXT.c diff --git a/src/eepp/ui/doc/textformat.cpp b/src/eepp/ui/doc/textformat.cpp index f75be661a..b802150d5 100644 --- a/src/eepp/ui/doc/textformat.cpp +++ b/src/eepp/ui/doc/textformat.cpp @@ -309,14 +309,18 @@ struct TextFileStats { } void calcScore() { - if ( !score ) { - score = ( 2.5f * numWhitespace + numPlainAscii - 100.f * numInvalidPoints() - - 50.f * numControl + 5.f * numExtended + 2.5f * num16bytes ) * - ooNumPoints; - } + score = ( ( 2.5f * numWhitespace + numPlainAscii - 100.f * numInvalidPoints() - + 50.f * numControl + 5.f * numExtended + 2.5f * num16bytes ) * + ( count16b ? ( num16bytes > 0 ? 1 : 0 ) : 1 ) ) * + ooNumPoints; } - float getScore() const { return score; } + bool allValidPoints() const { return numPoints == numValidPoints; } + + float getScore() { + calcScore(); + return score; + } }; static Uint32 scanTextFile( TextFileStats& stats, IOStream& ins, const TextEncoding* encoding, @@ -435,7 +439,8 @@ TextFormat guessFileEncoding( IOStream& ins ) { scanTextFile( statsShiftJIS, ins, TextEncoding::get(), NumBytesForAutodetect ); ins.seek( 0 ); - if ( statsShiftJIS.getScore() > stats->getScore() ) { + if ( statsShiftJIS.allValidPoints() && statsShiftJIS.num16bytes && + statsShiftJIS.getScore() > stats->getScore() ) { stats = &statsShiftJIS; encoding = TextFormat::Encoding::Shift_JIS; } @@ -473,7 +478,7 @@ TextFormat TextFormat::autodetect( IOStream& ins ) { tff.encoding = TextFormat::Encoding::UTF16BE; tff.bom = true; } else if ( h[0] == 0xff && h[1] == 0xfe ) { - tff.encoding = TextFormat::Encoding::UTF16BE; + tff.encoding = TextFormat::Encoding::UTF16LE; tff.bom = true; } ins.seek( start ); diff --git a/src/tests/unit_tests/main.cpp b/src/tests/unit_tests/main.cpp new file mode 100644 index 000000000..30dad370e --- /dev/null +++ b/src/tests/unit_tests/main.cpp @@ -0,0 +1,3 @@ +#include "utest.h" + +UTEST_MAIN() diff --git a/src/tests/unit_tests/textformat.cpp b/src/tests/unit_tests/textformat.cpp new file mode 100644 index 000000000..f076ef2bc --- /dev/null +++ b/src/tests/unit_tests/textformat.cpp @@ -0,0 +1,104 @@ +#include "utest.h" +#include +#include +#include +#include +#include +#include + +using namespace EE::Graphics; +using namespace EE::System; +using namespace EE::UI::Doc; + +TextFormat::Encoding encodingFromString( const std::string_view& str ) { + if ( str == "utf16be" ) + return TextFormat::Encoding::UTF16BE; + if ( str == "utf16le" ) + return TextFormat::Encoding::UTF16LE; + if ( str == "win1252" ) + return TextFormat::Encoding::Latin1; + if ( str == "shiftjis" ) + return TextFormat::Encoding::Shift_JIS; + if ( str == "utf8" ) + return TextFormat::Encoding::UTF8; + return TextFormat::Encoding::UTF8; +} + +UTEST( TextFormat, autodetect ) { + FileSystem::changeWorkingDirectory( Sys::getProcessPath() ); + auto files = FileSystem::filesInfoGetInPath( std::string{ "assets/textformat" }, false, true ); + for ( const auto& file : files ) { + if ( file.isDirectory() ) + continue; + auto fnParts( String::split( file.getFileName(), '.' ) ); + ASSERT_EQ( fnParts.size(), 5UL ); + auto lang = fnParts[0]; + auto encoding = encodingFromString( fnParts[1] ); + auto newLine = TextFormat::stringToLineEnding( String::toUpper( fnParts[2] ) ); + auto bom = fnParts[3] == "bom"; + IOStreamFile stream( file.getFilepath() ); + auto textFormat = TextFormat::autodetect( stream ); + ASSERT_EQ_MSG( + textFormat.bom, bom, + String::format( "%s %d vs %d", file.getFileName(), textFormat.bom, bom ).c_str() ); + ASSERT_EQ_MSG( textFormat.encoding, encoding, + String::format( "%s %s vs %s", file.getFileName(), + TextFormat::encodingToString( textFormat.encoding ), + TextFormat::encodingToString( encoding ) ) + .c_str() ); + ASSERT_EQ_MSG( textFormat.newLine, newLine, + String::format( "%s %s vs %s", file.getFileName(), + TextFormat::lineEndingToString( textFormat.newLine ), + TextFormat::lineEndingToString( newLine ) ) + .c_str() ); + } +} + +UTEST( TextFormat, autodetectProject ) { + std::string projectRoot = Sys::getProcessPath(); + FileSystem::dirRemoveSlashAtEnd( projectRoot ); + projectRoot = FileSystem::fileRemoveFileName( projectRoot ); + FileSystem::dirRemoveSlashAtEnd( projectRoot ); + projectRoot = FileSystem::fileRemoveFileName( projectRoot ) + "src"; + std::function checkFolder; + auto getEncoding = []( const std::string& filename ) { + static std::unordered_map KNOWN_ENCS = { + { "SDL_sunaudio.c", TextFormat::Encoding::Latin1 }, + { "default_cursor.h", TextFormat::Encoding::Latin1 }, + { "InfoPlist.strings", TextFormat::Encoding::UTF16BE }, + { "version.rc", TextFormat::Encoding::Latin1 }, + { "SDL_RLEaccel.c", TextFormat::Encoding::Latin1 }, + { "func_common.hpp", TextFormat::Encoding::Latin1 }, + { "func_common.inl", TextFormat::Encoding::Latin1 }, + { "type_half.inl", TextFormat::Encoding::Latin1 }, + }; + auto found = KNOWN_ENCS.find( filename ); + if ( found != KNOWN_ENCS.end() ) + return found->second; + return TextFormat::Encoding::UTF8; + }; + checkFolder = [&]( const std::string& folder ) { + auto files = FileSystem::filesInfoGetInPath( folder, false, true, true, true ); + for ( const auto& file : files ) { + if ( file.isDirectory() ) { + checkFolder( file.getFilepath() ); + continue; + } + auto extension = file.getExtension(); + if ( "a" == extension || "zip" == extension || "dll" == extension || + "dat" == extension || "cur" == extension || "icns" == extension || + "wav" == extension || Image::isImageExtension( file.getFilepath() ) || + LuaPattern::matches( file.getFilepath(), "SDL2%-%d+%.%d+%.%d+" ) ) + continue; + IOStreamFile stream( file.getFilepath() ); + auto expectedEncoding = getEncoding( file.getFileName() ); + auto textFormat = TextFormat::autodetect( stream ); + EXPECT_EQ_MSG( textFormat.encoding, expectedEncoding, + String::format( "%s %s vs %s", file.getFilepath(), + TextFormat::encodingToString( textFormat.encoding ), + TextFormat::encodingToString( expectedEncoding ) ) + .c_str() ); + } + }; + checkFolder( projectRoot ); +} diff --git a/src/tests/unit_tests/utest.h b/src/tests/unit_tests/utest.h new file mode 100644 index 000000000..5dc25b14c --- /dev/null +++ b/src/tests/unit_tests/utest.h @@ -0,0 +1,1700 @@ +/* + The latest version of this library is available on GitHub; + https://github.com/sheredom/utest.h +*/ + +/* + This is free and unencumbered software released into the public domain. + + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. + + In jurisdictions that recognize copyright laws, the author or authors + of this software dedicate any and all copyright interest in the + software to the public domain. We make this dedication for the benefit + of the public at large and to the detriment of our heirs and + successors. We intend this dedication to be an overt act of + relinquishment in perpetuity of all present and future rights to this + software under copyright law. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + For more information, please refer to +*/ + +#ifndef SHEREDOM_UTEST_H_INCLUDED +#define SHEREDOM_UTEST_H_INCLUDED + +#ifdef _MSC_VER +/* + Disable warning about not inlining 'inline' functions. +*/ +#pragma warning(disable : 4710) + +/* + Disable warning about inlining functions that are not marked 'inline'. +*/ +#pragma warning(disable : 4711) + +/* + Disable warning for alignment padding added +*/ +#pragma warning(disable : 4820) + +#if _MSC_VER > 1900 +/* + Disable warning about preprocessor macros not being defined in MSVC headers. +*/ +#pragma warning(disable : 4668) + +/* + Disable warning about no function prototype given in MSVC headers. +*/ +#pragma warning(disable : 4255) + +/* + Disable warning about pointer or reference to potentially throwing function. +*/ +#pragma warning(disable : 5039) + +/* + Disable warning about macro expansion producing 'defined' has undefined + behavior. +*/ +#pragma warning(disable : 5105) +#endif + +#if _MSC_VER > 1930 +/* + Disable warning about 'const' variable is not used. +*/ +#pragma warning(disable : 5264) +#endif + +#pragma warning(push, 1) +#endif + +#if defined(_MSC_VER) && (_MSC_VER < 1920) +typedef __int64 utest_int64_t; +typedef unsigned __int64 utest_uint64_t; +typedef unsigned __int32 utest_uint32_t; +#else +#include +typedef int64_t utest_int64_t; +typedef uint64_t utest_uint64_t; +typedef uint32_t utest_uint32_t; +#endif + +#include +#include +#include +#include +#include + +#if defined(__cplusplus) +#if defined(_MSC_VER) && !defined(_CPPUNWIND) +/* We're on MSVC and the compiler is compiling without exception support! */ +#elif !defined(_MSC_VER) && !defined(__EXCEPTIONS) +/* We're on a GCC/Clang compiler that doesn't have exception support! */ +#else +#define UTEST_HAS_EXCEPTIONS 1 +#endif +#endif + +#if defined(UTEST_HAS_EXCEPTIONS) +#include +#endif + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + +#if defined(__cplusplus) +#define UTEST_C_FUNC extern "C" +#else +#define UTEST_C_FUNC +#endif + +#define UTEST_TEST_PASSED (0) +#define UTEST_TEST_FAILURE (1) +#define UTEST_TEST_SKIPPED (2) + +#if defined(__TINYC__) +#define UTEST_ATTRIBUTE(a) __attribute((a)) +#else +#define UTEST_ATTRIBUTE(a) __attribute__((a)) +#endif + +#if defined(_MSC_VER) || defined(__MINGW64__) || defined(__MINGW32__) + +#if defined(__MINGW64__) || defined(__MINGW32__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Wunknown-pragmas" +#endif + +#if defined(_WINDOWS_) || defined(_WINDOWS_H) +typedef LARGE_INTEGER utest_large_integer; +#else +// use old QueryPerformanceCounter definitions (not sure is this needed in some +// edge cases or not) on Win7 with VS2015 these extern declaration cause "second +// C linkage of overloaded function not allowed" error +typedef union { + struct { + unsigned long LowPart; + long HighPart; + } DUMMYSTRUCTNAME; + struct { + unsigned long LowPart; + long HighPart; + } u; + utest_int64_t QuadPart; +} utest_large_integer; + +UTEST_C_FUNC __declspec(dllimport) int __stdcall QueryPerformanceCounter( + utest_large_integer *); +UTEST_C_FUNC __declspec(dllimport) int __stdcall QueryPerformanceFrequency( + utest_large_integer *); + +#if defined(__MINGW64__) || defined(__MINGW32__) +#pragma GCC diagnostic pop +#endif +#endif + +#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ + defined(__NetBSD__) || defined(__DragonFly__) || defined(__sun__) || \ + defined(__HAIKU__) +/* + slightly obscure include here - we need to include glibc's features.h, but + we don't want to just include a header that might not be defined for other + c libraries like musl. Instead we include limits.h, which we know on all + glibc distributions includes features.h +*/ +#include + +#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +#include + +#if ((2 < __GLIBC__) || ((2 == __GLIBC__) && (17 <= __GLIBC_MINOR__))) +/* glibc is version 2.17 or above, so we can just use clock_gettime */ +#define UTEST_USE_CLOCKGETTIME +#else +#include +#include +#endif +#else // Other libc implementations +#include +#define UTEST_USE_CLOCKGETTIME +#endif + +#elif defined(__APPLE__) +#include +#endif + +#if defined(_MSC_VER) && (_MSC_VER < 1920) +#define UTEST_PRId64 "I64d" +#define UTEST_PRIu64 "I64u" +#else +#include + +#define UTEST_PRId64 PRId64 +#define UTEST_PRIu64 PRIu64 +#endif + +#if defined(__cplusplus) +#define UTEST_INLINE inline + +#if defined(__clang__) +#define UTEST_INITIALIZER_BEGIN_DISABLE_WARNINGS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") + +#define UTEST_INITIALIZER_END_DISABLE_WARNINGS _Pragma("clang diagnostic pop") +#else +#define UTEST_INITIALIZER_BEGIN_DISABLE_WARNINGS +#define UTEST_INITIALIZER_END_DISABLE_WARNINGS +#endif + +#define UTEST_INITIALIZER(f) \ + struct f##_cpp_struct { \ + f##_cpp_struct(); \ + }; \ + UTEST_INITIALIZER_BEGIN_DISABLE_WARNINGS static f##_cpp_struct \ + f##_cpp_global UTEST_INITIALIZER_END_DISABLE_WARNINGS; \ + f##_cpp_struct::f##_cpp_struct() +#elif defined(_MSC_VER) +#define UTEST_INLINE __forceinline + +#if defined(_WIN64) +#define UTEST_SYMBOL_PREFIX +#else +#define UTEST_SYMBOL_PREFIX "_" +#endif + +#if defined(__clang__) +#define UTEST_INITIALIZER_BEGIN_DISABLE_WARNINGS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wmissing-variable-declarations\"") + +#define UTEST_INITIALIZER_END_DISABLE_WARNINGS _Pragma("clang diagnostic pop") +#else +#define UTEST_INITIALIZER_BEGIN_DISABLE_WARNINGS +#define UTEST_INITIALIZER_END_DISABLE_WARNINGS +#endif + +#pragma section(".CRT$XCU", read) +#define UTEST_INITIALIZER(f) \ + static void __cdecl f(void); \ + UTEST_INITIALIZER_BEGIN_DISABLE_WARNINGS \ + __pragma(comment(linker, "/include:" UTEST_SYMBOL_PREFIX #f "_")) \ + UTEST_C_FUNC __declspec(allocate(".CRT$XCU")) void(__cdecl * \ + f##_)(void) = f; \ + UTEST_INITIALIZER_END_DISABLE_WARNINGS \ + static void __cdecl f(void) +#else +#if defined(__linux__) +#if defined(__clang__) +#if __has_warning("-Wreserved-id-macro") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" +#endif +#endif + +#define __STDC_FORMAT_MACROS 1 + +#if defined(__clang__) +#if __has_warning("-Wreserved-id-macro") +#pragma clang diagnostic pop +#endif +#endif +#endif + +#define UTEST_INLINE inline + +#define UTEST_INITIALIZER(f) \ + static void f(void) UTEST_ATTRIBUTE(constructor); \ + static void f(void) +#endif + +#if defined(__cplusplus) +#define UTEST_CAST(type, x) static_cast(x) +#define UTEST_PTR_CAST(type, x) reinterpret_cast(x) +#define UTEST_EXTERN extern "C" +#define UTEST_NULL NULL +#else +#define UTEST_CAST(type, x) ((type)(x)) +#define UTEST_PTR_CAST(type, x) ((type)(x)) +#define UTEST_EXTERN extern +#define UTEST_NULL 0 +#endif + +#ifdef _MSC_VER +/* + io.h contains definitions for some structures with natural padding. This is + uninteresting, but for some reason MSVC's behaviour is to warn about + including this system header. That *is* interesting +*/ +#pragma warning(disable : 4820) +#pragma warning(push, 1) +#include +#pragma warning(pop) +#define UTEST_COLOUR_OUTPUT() (_isatty(_fileno(stdout))) +#else +#if defined(__EMSCRIPTEN__) +#include +#define UTEST_COLOUR_OUTPUT() false +#else +#include +#define UTEST_COLOUR_OUTPUT() (isatty(STDOUT_FILENO)) +#endif +#endif + +static UTEST_INLINE void *utest_realloc(void *const pointer, size_t new_size) { + void *const new_pointer = realloc(pointer, new_size); + + if (UTEST_NULL == new_pointer) { + free(pointer); + } + + return new_pointer; +} + +static UTEST_INLINE utest_int64_t utest_ns(void) { +#if defined(_MSC_VER) || defined(__MINGW64__) || defined(__MINGW32__) + utest_large_integer counter; + utest_large_integer frequency; + QueryPerformanceCounter(&counter); + QueryPerformanceFrequency(&frequency); + return UTEST_CAST(utest_int64_t, + (counter.QuadPart * 1000000000) / frequency.QuadPart); +#elif defined(__linux__) && defined(__STRICT_ANSI__) + return UTEST_CAST(utest_int64_t, clock()) * 1000000000 / CLOCKS_PER_SEC; +#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ + defined(__NetBSD__) || defined(__DragonFly__) || defined(__sun__) || \ + defined(__HAIKU__) + struct timespec ts; +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(__HAIKU__) + timespec_get(&ts, TIME_UTC); +#else + const clockid_t cid = CLOCK_REALTIME; +#if defined(UTEST_USE_CLOCKGETTIME) + clock_gettime(cid, &ts); +#else + syscall(SYS_clock_gettime, cid, &ts); +#endif +#endif + return UTEST_CAST(utest_int64_t, ts.tv_sec) * 1000 * 1000 * 1000 + ts.tv_nsec; +#elif __APPLE__ + return UTEST_CAST(utest_int64_t, clock_gettime_nsec_np(CLOCK_UPTIME_RAW)); +#elif __EMSCRIPTEN__ + return emscripten_performance_now() * 1000000.0; +#else +#error Unsupported platform! +#endif +} + +typedef void (*utest_testcase_t)(int *, size_t); + +struct utest_test_state_s { + utest_testcase_t func; + size_t index; + char *name; +}; + +struct utest_state_s { + struct utest_test_state_s *tests; + size_t tests_length; + FILE *output; +}; + +/* extern to the global state utest needs to execute */ +UTEST_EXTERN struct utest_state_s utest_state; + +#if defined(_MSC_VER) +#define UTEST_WEAK __forceinline +#elif defined(__MINGW32__) || defined(__MINGW64__) +#define UTEST_WEAK static UTEST_ATTRIBUTE(used) +#elif defined(__clang__) || defined(__GNUC__) || defined(__TINYC__) +#define UTEST_WEAK UTEST_ATTRIBUTE(weak) +#else +#error Non clang, non gcc, non MSVC, non tcc compiler found! +#endif + +#if defined(_MSC_VER) +#define UTEST_UNUSED +#else +#define UTEST_UNUSED UTEST_ATTRIBUTE(unused) +#endif + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wvariadic-macros" +#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#define UTEST_PRINTF(...) \ + if (utest_state.output) { \ + fprintf(utest_state.output, __VA_ARGS__); \ + } \ + printf(__VA_ARGS__) +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wvariadic-macros" +#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif + +#ifdef _MSC_VER +#define UTEST_SNPRINTF(BUFFER, N, ...) _snprintf_s(BUFFER, N, N, __VA_ARGS__) +#else +#define UTEST_SNPRINTF(...) snprintf(__VA_ARGS__) +#endif + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#if defined(__cplusplus) +/* if we are using c++ we can use overloaded methods (its in the language) */ +#define UTEST_OVERLOADABLE +#elif defined(__clang__) +/* otherwise, if we are using clang with c - use the overloadable attribute */ +#define UTEST_OVERLOADABLE UTEST_ATTRIBUTE(overloadable) +#endif + +#if defined(__cplusplus) && (__cplusplus >= 201103L) + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif + +#include + +template ::value> +struct utest_type_deducer final { + static void _(const T t); +}; + +template <> struct utest_type_deducer { + static void _(const signed char c) { + UTEST_PRINTF("%d", static_cast(c)); + } +}; + +template <> struct utest_type_deducer { + static void _(const unsigned char c) { + UTEST_PRINTF("%u", static_cast(c)); + } +}; + +template <> struct utest_type_deducer { + static void _(const short s) { UTEST_PRINTF("%d", static_cast(s)); } +}; + +template <> struct utest_type_deducer { + static void _(const unsigned short s) { + UTEST_PRINTF("%u", static_cast(s)); + } +}; + +template <> struct utest_type_deducer { + static void _(const float f) { UTEST_PRINTF("%f", static_cast(f)); } +}; + +template <> struct utest_type_deducer { + static void _(const double d) { UTEST_PRINTF("%f", d); } +}; + +template <> struct utest_type_deducer { + static void _(const long double d) { +#if defined(__MINGW32__) || defined(__MINGW64__) + /* MINGW is weird - doesn't like LF at all?! */ + UTEST_PRINTF("%f", (double)d); +#else + UTEST_PRINTF("%Lf", d); +#endif + } +}; + +template <> struct utest_type_deducer { + static void _(const int i) { UTEST_PRINTF("%d", i); } +}; + +template <> struct utest_type_deducer { + static void _(const unsigned int i) { UTEST_PRINTF("%u", i); } +}; + +template <> struct utest_type_deducer { + static void _(const long i) { UTEST_PRINTF("%ld", i); } +}; + +template <> struct utest_type_deducer { + static void _(const unsigned long i) { UTEST_PRINTF("%lu", i); } +}; + +template <> struct utest_type_deducer { + static void _(const long long i) { UTEST_PRINTF("%lld", i); } +}; + +template <> struct utest_type_deducer { + static void _(const unsigned long long i) { UTEST_PRINTF("%llu", i); } +}; + +template <> struct utest_type_deducer { + static void _(const bool i) { UTEST_PRINTF(i ? "true" : "false"); } +}; + +template struct utest_type_deducer { + static void _(const T *t) { + UTEST_PRINTF("%p", static_cast(const_cast(t))); + } +}; + +template struct utest_type_deducer { + static void _(T *t) { UTEST_PRINTF("%p", static_cast(t)); } +}; + +template struct utest_type_deducer { + static void _(const T t) { + UTEST_PRINTF("%llu", static_cast(t)); + } +}; + +template <> struct utest_type_deducer { + static void _(std::nullptr_t t) { + UTEST_PRINTF("%p", static_cast(t)); + } +}; + +template +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(const T t) { + utest_type_deducer::_(t); +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#elif defined(UTEST_OVERLOADABLE) + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(signed char c); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(signed char c) { + UTEST_PRINTF("%d", UTEST_CAST(int, c)); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(unsigned char c); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(unsigned char c) { + UTEST_PRINTF("%u", UTEST_CAST(unsigned int, c)); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(float f); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(float f) { + UTEST_PRINTF("%f", UTEST_CAST(double, f)); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(double d); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(double d) { + UTEST_PRINTF("%f", d); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long double d); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long double d) { +#if defined(__MINGW32__) || defined(__MINGW64__) + /* MINGW is weird - doesn't like LF at all?! */ + UTEST_PRINTF("%f", (double)d); +#else + UTEST_PRINTF("%Lf", d); +#endif +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(int i); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(int i) { + UTEST_PRINTF("%d", i); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(unsigned int i); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(unsigned int i) { + UTEST_PRINTF("%u", i); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long int i); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long int i) { + UTEST_PRINTF("%ld", i); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long unsigned int i); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long unsigned int i) { + UTEST_PRINTF("%lu", i); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(const void *p); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(const void *p) { + UTEST_PRINTF("%p", p); +} + +/* + long long is a c++11 extension +*/ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) || \ + defined(__cplusplus) && (__cplusplus >= 201103L) || \ + (defined(__MINGW32__) || defined(__MINGW64__)) + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long long int i); +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long long int i) { + UTEST_PRINTF("%lld", i); +} + +UTEST_WEAK UTEST_OVERLOADABLE void utest_type_printer(long long unsigned int i); +UTEST_WEAK UTEST_OVERLOADABLE void +utest_type_printer(long long unsigned int i) { + UTEST_PRINTF("%llu", i); +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#endif +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !(defined(__MINGW32__) || defined(__MINGW64__)) || \ + defined(__TINYC__) +#define utest_type_printer(val) \ + UTEST_PRINTF(_Generic((val), signed char \ + : "%d", unsigned char \ + : "%u", short \ + : "%d", unsigned short \ + : "%u", int \ + : "%d", long \ + : "%ld", long long \ + : "%lld", unsigned \ + : "%u", unsigned long \ + : "%lu", unsigned long long \ + : "%llu", float \ + : "%f", double \ + : "%f", long double \ + : "%Lf", default \ + : _Generic((val - val), ptrdiff_t \ + : "%p", default \ + : "undef")), \ + (val)) +#else +/* + we don't have the ability to print the values we got, so we create a macro + to tell our users we can't do anything fancy +*/ +#define utest_type_printer(...) UTEST_PRINTF("undef") +#endif + +#if defined(_MSC_VER) +#define UTEST_SURPRESS_WARNING_BEGIN \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) \ + __pragma(warning(disable : 4571)) __pragma(warning(disable : 4130)) +#define UTEST_SURPRESS_WARNING_END __pragma(warning(pop)) +#else +#define UTEST_SURPRESS_WARNING_BEGIN +#define UTEST_SURPRESS_WARNING_END +#endif + +#if defined(__cplusplus) && (__cplusplus >= 201103L) +#define UTEST_AUTO(x) auto +#elif !defined(__cplusplus) + +#if defined(__clang__) +/* clang-format off */ +/* had to disable clang-format here because it malforms the pragmas */ +#define UTEST_AUTO(x) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wgnu-auto-type\"") __auto_type \ + _Pragma("clang diagnostic pop") +/* clang-format on */ +#else +#define UTEST_AUTO(x) __typeof__(x + 0) +#endif + +#else +#define UTEST_AUTO(x) typeof(x + 0) +#endif + +#if defined(__clang__) +#define UTEST_STRNCMP(x, y, size) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"") \ + strncmp(x, y, size) _Pragma("clang diagnostic pop") +#else +#define UTEST_STRNCMP(x, y, size) strncmp(x, y, size) +#endif + +#if defined(_MSC_VER) +#define UTEST_STRNCPY(x, y, size) strcpy_s(x, size, y) +#elif !defined(__clang__) && defined(__GNUC__) +static UTEST_INLINE char * +utest_strncpy_gcc(char *const dst, const char *const src, const size_t size) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" + return strncpy(dst, src, size); +#pragma GCC diagnostic pop +} + +#define UTEST_STRNCPY(x, y, size) utest_strncpy_gcc(x, y, size) +#else +#define UTEST_STRNCPY(x, y, size) strncpy(x, y, size) +#endif + +#define UTEST_SKIP(msg) \ + do { \ + UTEST_PRINTF(" Skipped : '%s'\n", (msg)); \ + *utest_result = UTEST_TEST_SKIPPED; \ + return; \ + } while (0) + +#if defined(__clang__) +#define UTEST_COND(x, y, cond, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wlanguage-extension-token\"") \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat-pedantic\"") \ + _Pragma("clang diagnostic ignored \"-Wfloat-equal\"") \ + UTEST_AUTO(x) xEval = (x); \ + UTEST_AUTO(y) yEval = (y); \ + if (!((xEval)cond(yEval))) { \ + const char *const xAsString = #x; \ + const char *const yAsString = #y; \ + _Pragma("clang diagnostic pop") \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : ("); \ + UTEST_PRINTF("%s) " #cond " (%s", xAsString, yAsString); \ + UTEST_PRINTF(")\n"); \ + UTEST_PRINTF(" Actual : "); \ + utest_type_printer(xEval); \ + UTEST_PRINTF(" vs "); \ + utest_type_printer(yEval); \ + UTEST_PRINTF("\n"); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END +#elif defined(__GNUC__) || defined(__TINYC__) +#define UTEST_COND(x, y, cond, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + UTEST_AUTO(x) xEval = (x); \ + UTEST_AUTO(y) yEval = (y); \ + if (!((xEval)cond(yEval))) { \ + const char *const xAsString = #x; \ + const char *const yAsString = #y; \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : ("); \ + UTEST_PRINTF("%s) " #cond " (%s", xAsString, yAsString); \ + UTEST_PRINTF(")\n"); \ + UTEST_PRINTF(" Actual : "); \ + utest_type_printer(xEval); \ + UTEST_PRINTF(" vs "); \ + utest_type_printer(yEval); \ + UTEST_PRINTF("\n"); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END +#else +#define UTEST_COND(x, y, cond, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + if (!((x)cond(y))) { \ + UTEST_PRINTF("%s:%i: Failure (Expected " #cond " Actual)", __FILE__, \ + __LINE__); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s", msg); \ + } \ + UTEST_PRINTF("\n"); \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END +#endif + +#define EXPECT_EQ(x, y) UTEST_COND(x, y, ==, "", 0) +#define EXPECT_EQ_MSG(x, y, msg) UTEST_COND(x, y, ==, msg, 0) +#define ASSERT_EQ(x, y) UTEST_COND(x, y, ==, "", 1) +#define ASSERT_EQ_MSG(x, y, msg) UTEST_COND(x, y, ==, msg, 1) + +#define EXPECT_NE(x, y) UTEST_COND(x, y, !=, "", 0) +#define EXPECT_NE_MSG(x, y, msg) UTEST_COND(x, y, !=, msg, 0) +#define ASSERT_NE(x, y) UTEST_COND(x, y, !=, "", 1) +#define ASSERT_NE_MSG(x, y, msg) UTEST_COND(x, y, !=, msg, 1) + +#define EXPECT_LT(x, y) UTEST_COND(x, y, <, "", 0) +#define EXPECT_LT_MSG(x, y, msg) UTEST_COND(x, y, <, msg, 0) +#define ASSERT_LT(x, y) UTEST_COND(x, y, <, "", 1) +#define ASSERT_LT_MSG(x, y, msg) UTEST_COND(x, y, <, msg, 1) + +#define EXPECT_LE(x, y) UTEST_COND(x, y, <=, "", 0) +#define EXPECT_LE_MSG(x, y, msg) UTEST_COND(x, y, <=, msg, 0) +#define ASSERT_LE(x, y) UTEST_COND(x, y, <=, "", 1) +#define ASSERT_LE_MSG(x, y, msg) UTEST_COND(x, y, <=, msg, 1) + +#define EXPECT_GT(x, y) UTEST_COND(x, y, >, "", 0) +#define EXPECT_GT_MSG(x, y, msg) UTEST_COND(x, y, >, msg, 0) +#define ASSERT_GT(x, y) UTEST_COND(x, y, >, "", 1) +#define ASSERT_GT_MSG(x, y, msg) UTEST_COND(x, y, >, msg, 1) + +#define EXPECT_GE(x, y) UTEST_COND(x, y, >=, "", 0) +#define EXPECT_GE_MSG(x, y, msg) UTEST_COND(x, y, >=, msg, 0) +#define ASSERT_GE(x, y) UTEST_COND(x, y, >=, "", 1) +#define ASSERT_GE_MSG(x, y, msg) UTEST_COND(x, y, >=, msg, 1) + +#define UTEST_TRUE(x, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const int xEval = !!(x); \ + if (!(xEval)) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : true\n"); \ + UTEST_PRINTF(" Actual : %s\n", (xEval) ? "true" : "false"); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_TRUE(x) UTEST_TRUE(x, "", 0) +#define EXPECT_TRUE_MSG(x, msg) UTEST_TRUE(x, msg, 0) +#define ASSERT_TRUE(x) UTEST_TRUE(x, "", 1) +#define ASSERT_TRUE_MSG(x, msg) UTEST_TRUE(x, msg, 1) + +#define UTEST_FALSE(x, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const int xEval = !!(x); \ + if (xEval) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : false\n"); \ + UTEST_PRINTF(" Actual : %s\n", (xEval) ? "true" : "false"); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_FALSE(x) UTEST_FALSE(x, "", 0) +#define EXPECT_FALSE_MSG(x, msg) UTEST_FALSE(x, msg, 0) +#define ASSERT_FALSE(x) UTEST_FALSE(x, "", 1) +#define ASSERT_FALSE_MSG(x, msg) UTEST_FALSE(x, msg, 1) + +#define UTEST_STREQ(x, y, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const char *xEval = (x); \ + const char *yEval = (y); \ + if (UTEST_NULL == xEval || UTEST_NULL == yEval || \ + 0 != strcmp(xEval, yEval)) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : \"%s\"\n", xEval); \ + UTEST_PRINTF(" Actual : \"%s\"\n", yEval); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_STREQ(x, y) UTEST_STREQ(x, y, "", 0) +#define EXPECT_STREQ_MSG(x, y, msg) UTEST_STREQ(x, y, msg, 0) +#define ASSERT_STREQ(x, y) UTEST_STREQ(x, y, "", 1) +#define ASSERT_STREQ_MSG(x, y, msg) UTEST_STREQ(x, y, msg, 1) + +#define UTEST_STRNE(x, y, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const char *xEval = (x); \ + const char *yEval = (y); \ + if (UTEST_NULL == xEval || UTEST_NULL == yEval || \ + 0 == strcmp(xEval, yEval)) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : \"%s\"\n", xEval); \ + UTEST_PRINTF(" Actual : \"%s\"\n", yEval); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_STRNE(x, y) UTEST_STRNE(x, y, "", 0) +#define EXPECT_STRNE_MSG(x, y, msg) UTEST_STRNE(x, y, msg, 0) +#define ASSERT_STRNE(x, y) UTEST_STRNE(x, y, "", 1) +#define ASSERT_STRNE_MSG(x, y, msg) UTEST_STRNE(x, y, msg, 1) + +#define UTEST_STRNEQ(x, y, n, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const char *xEval = (x); \ + const char *yEval = (y); \ + const size_t nEval = UTEST_CAST(size_t, n); \ + if (UTEST_NULL == xEval || UTEST_NULL == yEval || \ + 0 != UTEST_STRNCMP(xEval, yEval, nEval)) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : \"%.*s\"\n", UTEST_CAST(int, nEval), xEval); \ + UTEST_PRINTF(" Actual : \"%.*s\"\n", UTEST_CAST(int, nEval), yEval); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_STRNEQ(x, y, n) UTEST_STRNEQ(x, y, n, "", 0) +#define EXPECT_STRNEQ_MSG(x, y, n, msg) UTEST_STRNEQ(x, y, n, msg, 0) +#define ASSERT_STRNEQ(x, y, n) UTEST_STRNEQ(x, y, n, "", 1) +#define ASSERT_STRNEQ_MSG(x, y, n, msg) UTEST_STRNEQ(x, y, n, msg, 1) + +#define UTEST_STRNNE(x, y, n, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const char *xEval = (x); \ + const char *yEval = (y); \ + const size_t nEval = UTEST_CAST(size_t, n); \ + if (UTEST_NULL == xEval || UTEST_NULL == yEval || \ + 0 == UTEST_STRNCMP(xEval, yEval, nEval)) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : \"%.*s\"\n", UTEST_CAST(int, nEval), xEval); \ + UTEST_PRINTF(" Actual : \"%.*s\"\n", UTEST_CAST(int, nEval), yEval); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_STRNNE(x, y, n) UTEST_STRNNE(x, y, n, "", 0) +#define EXPECT_STRNNE_MSG(x, y, n, msg) UTEST_STRNNE(x, y, n, msg, 0) +#define ASSERT_STRNNE(x, y, n) UTEST_STRNNE(x, y, n, "", 1) +#define ASSERT_STRNNE_MSG(x, y, n, msg) UTEST_STRNNE(x, y, n, msg, 1) + +#define UTEST_NEAR(x, y, epsilon, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + const double diff = \ + utest_fabs(UTEST_CAST(double, x) - UTEST_CAST(double, y)); \ + if (diff > UTEST_CAST(double, epsilon) || utest_isnan(diff)) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : %f\n", UTEST_CAST(double, x)); \ + UTEST_PRINTF(" Actual : %f\n", UTEST_CAST(double, y)); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_NEAR(x, y, epsilon) UTEST_NEAR(x, y, epsilon, "", 0) +#define EXPECT_NEAR_MSG(x, y, epsilon, msg) UTEST_NEAR(x, y, epsilon, msg, 0) +#define ASSERT_NEAR(x, y, epsilon) UTEST_NEAR(x, y, epsilon, "", 1) +#define ASSERT_NEAR_MSG(x, y, epsilon, msg) UTEST_NEAR(x, y, epsilon, msg, 1) + +#if defined(UTEST_HAS_EXCEPTIONS) +#define UTEST_EXCEPTION(x, exception_type, msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + int exception_caught = 0; \ + try { \ + x; \ + } catch (const exception_type &) { \ + exception_caught = 1; \ + } catch (...) { \ + exception_caught = 2; \ + } \ + if (1 != exception_caught) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : %s exception\n", #exception_type); \ + UTEST_PRINTF(" Actual : %s\n", (2 == exception_caught) \ + ? "Unexpected exception" \ + : "No exception"); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_EXCEPTION(x, exception_type) \ + UTEST_EXCEPTION(x, exception_type, "", 0) +#define EXPECT_EXCEPTION_MSG(x, exception_type, msg) \ + UTEST_EXCEPTION(x, exception_type, msg, 0) +#define ASSERT_EXCEPTION(x, exception_type) \ + UTEST_EXCEPTION(x, exception_type, "", 1) +#define ASSERT_EXCEPTION_MSG(x, exception_type, msg) \ + UTEST_EXCEPTION(x, exception_type, msg, 1) + +#define UTEST_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message, \ + msg, is_assert) \ + UTEST_SURPRESS_WARNING_BEGIN do { \ + int exception_caught = 0; \ + char *message_caught = UTEST_NULL; \ + try { \ + x; \ + } catch (const exception_type &e) { \ + const char *const what = e.what(); \ + exception_caught = 1; \ + if (0 != \ + UTEST_STRNCMP(what, exception_message, strlen(exception_message))) { \ + const size_t message_size = strlen(what) + 1; \ + message_caught = UTEST_PTR_CAST(char *, malloc(message_size)); \ + UTEST_STRNCPY(message_caught, what, message_size); \ + } \ + } catch (...) { \ + exception_caught = 2; \ + } \ + if (1 != exception_caught) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : %s exception\n", #exception_type); \ + UTEST_PRINTF(" Actual : %s\n", (2 == exception_caught) \ + ? "Unexpected exception" \ + : "No exception"); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + if (is_assert) { \ + return; \ + } \ + } else if (UTEST_NULL != message_caught) { \ + UTEST_PRINTF("%s:%i: Failure\n", __FILE__, __LINE__); \ + UTEST_PRINTF(" Expected : %s exception with message %s\n", \ + #exception_type, exception_message); \ + UTEST_PRINTF(" Actual message : %s\n", message_caught); \ + if (strlen(msg) > 0) { \ + UTEST_PRINTF(" Message : %s\n", msg); \ + } \ + *utest_result = UTEST_TEST_FAILURE; \ + free(message_caught); \ + if (is_assert) { \ + return; \ + } \ + } \ + } \ + while (0) \ + UTEST_SURPRESS_WARNING_END + +#define EXPECT_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message) \ + UTEST_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message, "", 0) +#define EXPECT_EXCEPTION_WITH_MESSAGE_MSG(x, exception_type, \ + exception_message, msg) \ + UTEST_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message, msg, 0) +#define ASSERT_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message) \ + UTEST_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message, "", 1) +#define ASSERT_EXCEPTION_WITH_MESSAGE_MSG(x, exception_type, \ + exception_message, msg) \ + UTEST_EXCEPTION_WITH_MESSAGE(x, exception_type, exception_message, msg, 1) +#endif + +#if defined(__clang__) +#if __has_warning("-Wunsafe-buffer-usage") +#define UTEST_SURPRESS_WARNINGS_BEGIN \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wunsafe-buffer-usage\"") +#define UTEST_SURPRESS_WARNINGS_END _Pragma("clang diagnostic pop") +#else +#define UTEST_SURPRESS_WARNINGS_BEGIN +#define UTEST_SURPRESS_WARNINGS_END +#endif +#elif defined(__GNUC__) && __GNUC__ >= 8 && defined(__cplusplus) +#define UTEST_SURPRESS_WARNINGS_BEGIN \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wclass-memaccess\"") +#define UTEST_SURPRESS_WARNINGS_END _Pragma("GCC diagnostic pop") +#else +#define UTEST_SURPRESS_WARNINGS_BEGIN +#define UTEST_SURPRESS_WARNINGS_END +#endif + +#define UTEST(SET, NAME) \ + UTEST_SURPRESS_WARNINGS_BEGIN \ + UTEST_EXTERN struct utest_state_s utest_state; \ + static void utest_run_##SET##_##NAME(int *utest_result); \ + static void utest_##SET##_##NAME(int *utest_result, size_t utest_index) { \ + (void)utest_index; \ + utest_run_##SET##_##NAME(utest_result); \ + } \ + UTEST_INITIALIZER(utest_register_##SET##_##NAME) { \ + const size_t index = utest_state.tests_length++; \ + const char name_part[] = #SET "." #NAME; \ + const size_t name_size = strlen(name_part) + 1; \ + char *name = UTEST_PTR_CAST(char *, malloc(name_size)); \ + utest_state.tests = UTEST_PTR_CAST( \ + struct utest_test_state_s *, \ + utest_realloc(UTEST_PTR_CAST(void *, utest_state.tests), \ + sizeof(struct utest_test_state_s) * \ + utest_state.tests_length)); \ + if (utest_state.tests && name) { \ + utest_state.tests[index].func = &utest_##SET##_##NAME; \ + utest_state.tests[index].name = name; \ + utest_state.tests[index].index = 0; \ + UTEST_SNPRINTF(name, name_size, "%s", name_part); \ + } else { \ + if (utest_state.tests) { \ + free(utest_state.tests); \ + utest_state.tests = NULL; \ + } \ + if (name) { \ + free(name); \ + } \ + } \ + } \ + UTEST_SURPRESS_WARNINGS_END \ + void utest_run_##SET##_##NAME(int *utest_result) + +#define UTEST_F_SETUP(FIXTURE) \ + static void utest_f_setup_##FIXTURE(int *utest_result, \ + struct FIXTURE *utest_fixture) + +#define UTEST_F_TEARDOWN(FIXTURE) \ + static void utest_f_teardown_##FIXTURE(int *utest_result, \ + struct FIXTURE *utest_fixture) + +#define UTEST_F(FIXTURE, NAME) \ + UTEST_SURPRESS_WARNINGS_BEGIN \ + UTEST_EXTERN struct utest_state_s utest_state; \ + static void utest_f_setup_##FIXTURE(int *, struct FIXTURE *); \ + static void utest_f_teardown_##FIXTURE(int *, struct FIXTURE *); \ + static void utest_run_##FIXTURE##_##NAME(int *, struct FIXTURE *); \ + static void utest_f_##FIXTURE##_##NAME(int *utest_result, \ + size_t utest_index) { \ + struct FIXTURE fixture; \ + (void)utest_index; \ + memset(&fixture, 0, sizeof(fixture)); \ + utest_f_setup_##FIXTURE(utest_result, &fixture); \ + if (UTEST_TEST_PASSED != *utest_result) { \ + return; \ + } \ + utest_run_##FIXTURE##_##NAME(utest_result, &fixture); \ + utest_f_teardown_##FIXTURE(utest_result, &fixture); \ + } \ + UTEST_INITIALIZER(utest_register_##FIXTURE##_##NAME) { \ + const size_t index = utest_state.tests_length++; \ + const char name_part[] = #FIXTURE "." #NAME; \ + const size_t name_size = strlen(name_part) + 1; \ + char *name = UTEST_PTR_CAST(char *, malloc(name_size)); \ + utest_state.tests = UTEST_PTR_CAST( \ + struct utest_test_state_s *, \ + utest_realloc(UTEST_PTR_CAST(void *, utest_state.tests), \ + sizeof(struct utest_test_state_s) * \ + utest_state.tests_length)); \ + if (utest_state.tests && name) { \ + utest_state.tests[index].func = &utest_f_##FIXTURE##_##NAME; \ + utest_state.tests[index].name = name; \ + UTEST_SNPRINTF(name, name_size, "%s", name_part); \ + } else { \ + if (utest_state.tests) { \ + free(utest_state.tests); \ + utest_state.tests = NULL; \ + } \ + if (name) { \ + free(name); \ + } \ + } \ + } \ + UTEST_SURPRESS_WARNINGS_END \ + void utest_run_##FIXTURE##_##NAME(int *utest_result, \ + struct FIXTURE *utest_fixture) + +#define UTEST_I_SETUP(FIXTURE) \ + static void utest_i_setup_##FIXTURE( \ + int *utest_result, struct FIXTURE *utest_fixture, size_t utest_index) + +#define UTEST_I_TEARDOWN(FIXTURE) \ + static void utest_i_teardown_##FIXTURE( \ + int *utest_result, struct FIXTURE *utest_fixture, size_t utest_index) + +#define UTEST_I(FIXTURE, NAME, INDEX) \ + UTEST_SURPRESS_WARNINGS_BEGIN \ + UTEST_EXTERN struct utest_state_s utest_state; \ + static void utest_run_##FIXTURE##_##NAME##_##INDEX(int *, struct FIXTURE *); \ + static void utest_i_##FIXTURE##_##NAME##_##INDEX(int *utest_result, \ + size_t index) { \ + struct FIXTURE fixture; \ + memset(&fixture, 0, sizeof(fixture)); \ + utest_i_setup_##FIXTURE(utest_result, &fixture, index); \ + if (UTEST_TEST_PASSED != *utest_result) { \ + return; \ + } \ + utest_run_##FIXTURE##_##NAME##_##INDEX(utest_result, &fixture); \ + utest_i_teardown_##FIXTURE(utest_result, &fixture, index); \ + } \ + UTEST_INITIALIZER(utest_register_##FIXTURE##_##NAME##_##INDEX) { \ + size_t i; \ + utest_uint64_t iUp; \ + for (i = 0; i < (INDEX); i++) { \ + const size_t index = utest_state.tests_length++; \ + const char name_part[] = #FIXTURE "." #NAME; \ + const size_t name_size = strlen(name_part) + 32; \ + char *name = UTEST_PTR_CAST(char *, malloc(name_size)); \ + utest_state.tests = UTEST_PTR_CAST( \ + struct utest_test_state_s *, \ + utest_realloc(UTEST_PTR_CAST(void *, utest_state.tests), \ + sizeof(struct utest_test_state_s) * \ + utest_state.tests_length)); \ + if (utest_state.tests && name) { \ + utest_state.tests[index].func = &utest_i_##FIXTURE##_##NAME##_##INDEX; \ + utest_state.tests[index].index = i; \ + utest_state.tests[index].name = name; \ + iUp = UTEST_CAST(utest_uint64_t, i); \ + UTEST_SNPRINTF(name, name_size, "%s/%" UTEST_PRIu64, name_part, iUp); \ + } else { \ + if (utest_state.tests) { \ + free(utest_state.tests); \ + utest_state.tests = NULL; \ + } \ + if (name) { \ + free(name); \ + } \ + } \ + } \ + } \ + UTEST_SURPRESS_WARNINGS_END \ + void utest_run_##FIXTURE##_##NAME##_##INDEX(int *utest_result, \ + struct FIXTURE *utest_fixture) + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif + +UTEST_WEAK +double utest_fabs(double d); +UTEST_WEAK +double utest_fabs(double d) { + union { + double d; + utest_uint64_t u; + } both; + both.d = d; + both.u &= 0x7fffffffffffffffu; + return both.d; +} + +UTEST_WEAK +int utest_isnan(double d); +UTEST_WEAK +int utest_isnan(double d) { + union { + double d; + utest_uint64_t u; + } both; + both.d = d; + both.u &= 0x7fffffffffffffffu; + return both.u > 0x7ff0000000000000u; +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#if defined(__clang__) +#if __has_warning("-Wunsafe-buffer-usage") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +#endif +#endif + +UTEST_WEAK +int utest_should_filter_test(const char *filter, const char *testcase); +UTEST_WEAK int utest_should_filter_test(const char *filter, + const char *testcase) { + if (filter) { + const char *filter_cur = filter; + const char *testcase_cur = testcase; + const char *filter_wildcard = UTEST_NULL; + + while (('\0' != *filter_cur) && ('\0' != *testcase_cur)) { + if ('*' == *filter_cur) { + /* store the position of the wildcard */ + filter_wildcard = filter_cur; + + /* skip the wildcard character */ + filter_cur++; + + while (('\0' != *filter_cur) && ('\0' != *testcase_cur)) { + if ('*' == *filter_cur) { + /* + we found another wildcard (filter is something like *foo*) so we + exit the current loop, and return to the parent loop to handle + the wildcard case + */ + break; + } else if (*filter_cur != *testcase_cur) { + /* otherwise our filter didn't match, so reset it */ + filter_cur = filter_wildcard; + } + + /* move testcase along */ + testcase_cur++; + + /* move filter along */ + filter_cur++; + } + + if (('\0' == *filter_cur) && ('\0' == *testcase_cur)) { + return 0; + } + + /* if the testcase has been exhausted, we don't have a match! */ + if ('\0' == *testcase_cur) { + return 1; + } + } else { + if (*testcase_cur != *filter_cur) { + /* test case doesn't match filter */ + return 1; + } else { + /* move our filter and testcase forward */ + testcase_cur++; + filter_cur++; + } + } + } + + if (('\0' != *filter_cur) || + (('\0' != *testcase_cur) && + ((filter == filter_cur) || ('*' != filter_cur[-1])))) { + /* we have a mismatch! */ + return 1; + } + } + + return 0; +} + +static UTEST_INLINE FILE *utest_fopen(const char *filename, const char *mode) { +#ifdef _MSC_VER + FILE *file; + if (0 == fopen_s(&file, filename, mode)) { + return file; + } else { + return UTEST_NULL; + } +#else + return fopen(filename, mode); +#endif +} + +static UTEST_INLINE int utest_main(int argc, const char *const argv[]); +int utest_main(int argc, const char *const argv[]) { + utest_uint64_t failed = 0; + utest_uint64_t skipped = 0; + size_t index = 0; + size_t *failed_testcases = UTEST_NULL; + size_t failed_testcases_length = 0; + size_t *skipped_testcases = UTEST_NULL; + size_t skipped_testcases_length = 0; + const char *filter = UTEST_NULL; + utest_uint64_t ran_tests = 0; + int enable_mixed_units = 0; + int random_order = 0; + utest_uint32_t seed = 0; + + enum colours { RESET, GREEN, RED, YELLOW }; + + const int use_colours = UTEST_COLOUR_OUTPUT(); + const char *colours[] = {"\033[0m", "\033[32m", "\033[31m", "\033[33m"}; + + if (!use_colours) { + for (index = 0; index < sizeof colours / sizeof colours[0]; index++) { + colours[index] = ""; + } + } + /* loop through all arguments looking for our options */ + for (index = 1; index < UTEST_CAST(size_t, argc); index++) { + /* Informational switches */ + const char help_str[] = "--help"; + const char list_str[] = "--list-tests"; + /* Test config switches */ + const char filter_str[] = "--filter="; + const char output_str[] = "--output="; + const char enable_mixed_units_str[] = "--enable-mixed-units"; + const char random_order_str[] = "--random-order"; + const char random_order_with_seed_str[] = "--random-order="; + + if (0 == UTEST_STRNCMP(argv[index], help_str, strlen(help_str))) { + printf("utest.h - the single file unit testing solution for C/C++!\n" + "Command line Options:\n" + " --help Show this message and exit.\n" + " --filter= Filter the test cases to run (EG. " + "MyTest*.a would run MyTestCase.a but not MyTestCase.b).\n" + " --list-tests List testnames, one per line. Output " + "names can be passed to --filter.\n"); + printf(" --output= Output an xunit XML file to the file " + "specified in .\n" + " --enable-mixed-units Enable the per-test output to contain " + "mixed units (s/ms/us/ns).\n" + " --random-order[=] Randomize the order that the tests are " + "ran in. If the optional argument is not provided, then a " + "random starting seed is used.\n"); + goto cleanup; + } else if (0 == + UTEST_STRNCMP(argv[index], filter_str, strlen(filter_str))) { + /* user wants to filter what test cases run! */ + filter = argv[index] + strlen(filter_str); + } else if (0 == + UTEST_STRNCMP(argv[index], output_str, strlen(output_str))) { + utest_state.output = utest_fopen(argv[index] + strlen(output_str), "w+"); + } else if (0 == UTEST_STRNCMP(argv[index], list_str, strlen(list_str))) { + for (index = 0; index < utest_state.tests_length; index++) { + UTEST_PRINTF("%s\n", utest_state.tests[index].name); + } + /* when printing the test list, don't actually run the tests */ + return 0; + } else if (0 == UTEST_STRNCMP(argv[index], enable_mixed_units_str, + strlen(enable_mixed_units_str))) { + enable_mixed_units = 1; + } else if (0 == UTEST_STRNCMP(argv[index], random_order_with_seed_str, + strlen(random_order_with_seed_str))) { + seed = + UTEST_CAST(utest_uint32_t, + strtoul(argv[index] + strlen(random_order_with_seed_str), + UTEST_NULL, 10)); + random_order = 1; + } else if (0 == UTEST_STRNCMP(argv[index], random_order_str, + strlen(random_order_str))) { + const utest_int64_t ns = utest_ns(); + + // Some really poor pseudo-random using the current time. I do this + // because I really want to avoid using C's rand() because that'd mean our + // random would be affected by any srand() usage by the user (which I + // don't want). + seed = UTEST_CAST(utest_uint32_t, ns >> 32) * 31 + + UTEST_CAST(utest_uint32_t, ns & 0xffffffff); + random_order = 1; + } + } + + if (random_order) { + // Use Fisher-Yates with the Durstenfield's version to randomly re-order the + // tests. + for (index = utest_state.tests_length; index > 1; index--) { + // For the random order we'll use PCG. + const utest_uint32_t state = seed; + const utest_uint32_t word = + ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u; + const utest_uint32_t next = + ((word >> 22u) ^ word) % UTEST_CAST(utest_uint32_t, index); + + // Swap the randomly chosen element into the last location. + const struct utest_test_state_s copy = utest_state.tests[index - 1]; + utest_state.tests[index - 1] = utest_state.tests[next]; + utest_state.tests[next] = copy; + + // Move the seed onwards. + seed = seed * 747796405u + 2891336453u; + } + } + + for (index = 0; index < utest_state.tests_length; index++) { + if (utest_should_filter_test(filter, utest_state.tests[index].name)) { + continue; + } + + ran_tests++; + } + + printf("%s[==========]%s Running %" UTEST_PRIu64 " test cases.\n", + colours[GREEN], colours[RESET], UTEST_CAST(utest_uint64_t, ran_tests)); + + if (utest_state.output) { + fprintf(utest_state.output, "\n"); + fprintf(utest_state.output, + "\n", + UTEST_CAST(utest_uint64_t, ran_tests)); + fprintf(utest_state.output, + "\n", + UTEST_CAST(utest_uint64_t, ran_tests)); + } + + for (index = 0; index < utest_state.tests_length; index++) { + int result = UTEST_TEST_PASSED; + utest_int64_t ns = 0; + + if (utest_should_filter_test(filter, utest_state.tests[index].name)) { + continue; + } + + printf("%s[ RUN ]%s %s\n", colours[GREEN], colours[RESET], + utest_state.tests[index].name); + + if (utest_state.output) { + fprintf(utest_state.output, "", + utest_state.tests[index].name); + } + + ns = utest_ns(); + errno = 0; +#if defined(UTEST_HAS_EXCEPTIONS) + UTEST_SURPRESS_WARNING_BEGIN + try { + utest_state.tests[index].func(&result, utest_state.tests[index].index); + } catch (const std::exception &err) { + printf(" Exception : %s\n", err.what()); + result = UTEST_TEST_FAILURE; + } catch (...) { + printf(" Exception : Unknown\n"); + result = UTEST_TEST_FAILURE; + } + UTEST_SURPRESS_WARNING_END +#else + utest_state.tests[index].func(&result, utest_state.tests[index].index); +#endif + ns = utest_ns() - ns; + + if (utest_state.output) { + fprintf(utest_state.output, "\n"); + } + + // Record the failing test. + if (UTEST_TEST_FAILURE == result) { + const size_t failed_testcase_index = failed_testcases_length++; + failed_testcases = UTEST_PTR_CAST( + size_t *, utest_realloc(UTEST_PTR_CAST(void *, failed_testcases), + sizeof(size_t) * failed_testcases_length)); + if (UTEST_NULL != failed_testcases) { + failed_testcases[failed_testcase_index] = index; + } + failed++; + } else if (UTEST_TEST_SKIPPED == result) { + const size_t skipped_testcase_index = skipped_testcases_length++; + skipped_testcases = UTEST_PTR_CAST( + size_t *, utest_realloc(UTEST_PTR_CAST(void *, skipped_testcases), + sizeof(size_t) * skipped_testcases_length)); + if (UTEST_NULL != skipped_testcases) { + skipped_testcases[skipped_testcase_index] = index; + } + skipped++; + } + + { + const char *const units[] = {"ns", "us", "ms", "s", UTEST_NULL}; + unsigned int unit_index = 0; + utest_int64_t time = ns; + + if (enable_mixed_units) { + for (unit_index = 0; UTEST_NULL != units[unit_index]; unit_index++) { + if (10000 > time) { + break; + } + + time /= 1000; + } + } + + if (UTEST_TEST_FAILURE == result) { + printf("%s[ FAILED ]%s %s (%" UTEST_PRId64 "%s)\n", colours[RED], + colours[RESET], utest_state.tests[index].name, time, + units[unit_index]); + } else if (UTEST_TEST_SKIPPED == result) { + printf("%s[ SKIPPED ]%s %s (%" UTEST_PRId64 "%s)\n", colours[YELLOW], + colours[RESET], utest_state.tests[index].name, time, + units[unit_index]); + } else { + printf("%s[ OK ]%s %s (%" UTEST_PRId64 "%s)\n", colours[GREEN], + colours[RESET], utest_state.tests[index].name, time, + units[unit_index]); + } + } + } + + printf("%s[==========]%s %" UTEST_PRIu64 " test cases ran.\n", colours[GREEN], + colours[RESET], ran_tests); + printf("%s[ PASSED ]%s %" UTEST_PRIu64 " tests.\n", colours[GREEN], + colours[RESET], ran_tests - failed - skipped); + + if (0 != skipped) { + printf("%s[ SKIPPED ]%s %" UTEST_PRIu64 " tests, listed below:\n", + colours[YELLOW], colours[RESET], skipped); + for (index = 0; index < skipped_testcases_length; index++) { + printf("%s[ SKIPPED ]%s %s\n", colours[YELLOW], colours[RESET], + utest_state.tests[skipped_testcases[index]].name); + } + } + + if (0 != failed) { + printf("%s[ FAILED ]%s %" UTEST_PRIu64 " tests, listed below:\n", + colours[RED], colours[RESET], failed); + for (index = 0; index < failed_testcases_length; index++) { + printf("%s[ FAILED ]%s %s\n", colours[RED], colours[RESET], + utest_state.tests[failed_testcases[index]].name); + } + } + + if (utest_state.output) { + fprintf(utest_state.output, "\n\n"); + } + +cleanup: + for (index = 0; index < utest_state.tests_length; index++) { + free(UTEST_PTR_CAST(void *, utest_state.tests[index].name)); + } + + free(UTEST_PTR_CAST(void *, skipped_testcases)); + free(UTEST_PTR_CAST(void *, failed_testcases)); + free(UTEST_PTR_CAST(void *, utest_state.tests)); + + if (utest_state.output) { + fclose(utest_state.output); + } + + return UTEST_CAST(int, failed); +} + +#if defined(__clang__) +#if __has_warning("-Wunsafe-buffer-usage") +#pragma clang diagnostic pop +#endif +#endif + +/* + we need, in exactly one source file, define the global struct that will hold + the data we need to run utest. This macro allows the user to declare the + data without having to use the UTEST_MAIN macro, thus allowing them to write + their own main() function. +*/ +#define UTEST_STATE() struct utest_state_s utest_state = {0, 0, 0} + +/* + define a main() function to call into utest.h and start executing tests! A + user can optionally not use this macro, and instead define their own main() + function and manually call utest_main. The user must, in exactly one source + file, use the UTEST_STATE macro to declare a global struct variable that + utest requires. +*/ +#define UTEST_MAIN() \ + UTEST_STATE(); \ + int main(int argc, const char *const argv[]) { \ + return utest_main(argc, argv); \ + } + +#endif /* SHEREDOM_UTEST_H_INCLUDED */ diff --git a/src/thirdparty/libzip/zip.h b/src/thirdparty/libzip/zip.h index f1ff2fad2..6bbe795d9 100644 --- a/src/thirdparty/libzip/zip.h +++ b/src/thirdparty/libzip/zip.h @@ -34,7 +34,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #ifndef ZIP_EXTERN /*#ifdef _WIN32 @@ -160,7 +160,7 @@ extern "C" { #endif #define ZIP_EM_UNKNOWN 0xffff /* unknown algorithm */ - + enum zip_source_cmd { ZIP_SOURCE_OPEN, /* prepare for reading */ @@ -203,7 +203,7 @@ struct zip_source; typedef zip_int64_t (*zip_source_callback)(void *, void *, zip_uint64_t, enum zip_source_cmd); - + ZIP_EXTERN zip_int64_t zip_add(struct zip *, const char *, struct zip_source *); ZIP_EXTERN zip_int64_t zip_add_dir(struct zip *, const char *); diff --git a/src/thirdparty/libzip/zip_add.c b/src/thirdparty/libzip/zip_add.c index 6a310a836..675df9ec5 100644 --- a/src/thirdparty/libzip/zip_add.c +++ b/src/thirdparty/libzip/zip_add.c @@ -17,7 +17,7 @@ 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + /* NOTE: Return type is signed so we can return -1 on error. @@ -51,6 +51,6 @@ zip_add(struct zip *za, const char *name, struct zip_source *source) _zip_error_set(&za->error, ZIP_ER_INVAL, 0); return -1; } - + return _zip_replace(za, ZIP_UINT64_MAX, name, source); } diff --git a/src/thirdparty/libzip/zip_add_dir.c b/src/thirdparty/libzip/zip_add_dir.c index 28a8ad143..f6d02bcdb 100644 --- a/src/thirdparty/libzip/zip_add_dir.c +++ b/src/thirdparty/libzip/zip_add_dir.c @@ -17,7 +17,7 @@ 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -31,14 +31,14 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include #include "zipint.h" - + /* NOTE: Signed due to -1 on error. See zip_add.c for more details. */ @@ -77,7 +77,7 @@ zip_add_dir(struct zip *za, const char *name) free(s); return -1; } - + ret = _zip_replace(za, -1, s ? s : name, source); free(s); diff --git a/src/thirdparty/libzip/zip_close.c b/src/thirdparty/libzip/zip_close.c index 5e8375596..71231c703 100644 --- a/src/thirdparty/libzip/zip_close.c +++ b/src/thirdparty/libzip/zip_close.c @@ -17,7 +17,7 @@ 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" @@ -63,14 +63,14 @@ static int _zip_cdir_set_comment(struct zip_cdir *, struct zip *); static char *_zip_create_temp_output(struct zip *, FILE **); static int _zip_torrentzip_cmp(const void *, const void *); - + struct filelist { int idx; const char *name; }; - + ZIP_EXTERN int zip_close(struct zip *za) @@ -108,7 +108,7 @@ zip_close(struct zip *za) } _zip_free(za); return 0; - } + } if ((filelist=(struct filelist *)malloc(sizeof(filelist[0])*survivors)) == NULL) @@ -175,7 +175,7 @@ zip_close(struct zip *za) if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0)) _zip_dirent_torrent_normalize(&de); - + /* use it as central directory entry */ memcpy(cd->entry+j, &de, sizeof(cd->entry[j])); @@ -273,7 +273,7 @@ zip_close(struct zip *za) } if (zs) zip_source_free(zs); - + cd->entry[j].last_mod = de.last_mod; cd->entry[j].comp_method = de.comp_method; cd->entry[j].comp_size = de.comp_size; @@ -302,7 +302,7 @@ zip_close(struct zip *za) if (write_cdir(za, cd, out) < 0) error = 1; } - + /* pointers in cd entries are owned by za */ cd->nentry = 0; _zip_cdir_free(cd); @@ -321,7 +321,7 @@ zip_close(struct zip *za) free(temp); return -1; } - + if (za->zp) { fclose(za->zp); za->zp = NULL; @@ -345,11 +345,11 @@ zip_close(struct zip *za) _zip_free(za); free(temp); - + return 0; } - + static int add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, @@ -360,7 +360,7 @@ add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, struct zip_source *s2; zip_compression_implementation comp_impl; int ret; - + if (zip_source_stat(src, &st) < 0) { _zip_error_set_from_source(&za->error, src); return -1; @@ -375,7 +375,7 @@ add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, zip_source_pop(s2); return -1; } - + /* XXX: deflate 0-byte files for torrentzip? */ if (((st.valid & ZIP_STAT_COMP_METHOD) == 0 || st.comp_method == ZIP_CM_STORE) @@ -398,12 +398,12 @@ add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, s2 = src; offdata = ftello(ft); - + ret = copy_source(za, s2, ft); - + if (zip_source_stat(s2, &st) < 0) ret = -1; - + while (s2 != src) { if ((s2=zip_source_pop(s2)) == NULL) { /* XXX: set erorr */ @@ -433,7 +433,7 @@ add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, if (_zip_dirent_write(de, ft, 1, &za->error) < 0) return -1; - + if (fseeko(ft, offend, SEEK_SET) < 0) { _zip_error_set(&za->error, ZIP_ER_SEEK, errno); return -1; @@ -442,7 +442,7 @@ add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, return 0; } - + static int copy_data(FILE *fs, off_t len, FILE *ft, struct zip_error *error) @@ -468,14 +468,14 @@ copy_data(FILE *fs, off_t len, FILE *ft, struct zip_error *error) _zip_error_set(error, ZIP_ER_WRITE, errno); return -1; } - + len -= n; } return 0; } - + static int copy_source(struct zip *za, struct zip_source *src, FILE *ft) @@ -497,19 +497,19 @@ copy_source(struct zip *za, struct zip_source *src, FILE *ft) break; } } - + if (n < 0) { if (ret == 0) _zip_error_set_from_source(&za->error, src); ret = -1; - } + } zip_source_close(src); - + return ret; } - + static int write_cdir(struct zip *za, struct zip_cdir *cd, FILE *out) @@ -517,10 +517,10 @@ write_cdir(struct zip *za, struct zip_cdir *cd, FILE *out) off_t offset; uLong crc; char buf[TORRENT_CRC_LEN+1]; - + if (_zip_cdir_write(cd, out, &za->error) < 0) return -1; - + if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0) == 0) return 0; @@ -547,7 +547,7 @@ write_cdir(struct zip *za, struct zip_cdir *cd, FILE *out) return 0; } - + static int _zip_cdir_set_comment(struct zip_cdir *dest, struct zip *src) @@ -571,7 +571,7 @@ _zip_cdir_set_comment(struct zip_cdir *dest, struct zip *src) return 0; } - + int _zip_changed(struct zip *za, int *survivorsp) @@ -599,7 +599,7 @@ _zip_changed(struct zip *za, int *survivorsp) return changed; } - + static char * _zip_create_temp_output(struct zip *za, FILE **outp) @@ -607,7 +607,7 @@ _zip_create_temp_output(struct zip *za, FILE **outp) char *temp; int tfd; FILE *tfp; - + if ((temp=(char *)malloc(strlen(za->zn)+8)) == NULL) { _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return NULL; @@ -620,7 +620,7 @@ _zip_create_temp_output(struct zip *za, FILE **outp) free(temp); return NULL; } - + if ((tfp=fdopen(tfd, "r+b")) == NULL) { _zip_error_set(&za->error, ZIP_ER_TMPOPEN, errno); close(tfd); @@ -641,7 +641,7 @@ _zip_create_temp_output(struct zip *za, FILE **outp) return temp; } - + static int _zip_torrentzip_cmp(const void *a, const void *b) diff --git a/src/thirdparty/libzip/zip_delete.c b/src/thirdparty/libzip/zip_delete.c index 8178ebbac..65509e8fe 100644 --- a/src/thirdparty/libzip/zip_delete.c +++ b/src/thirdparty/libzip/zip_delete.c @@ -17,7 +17,7 @@ 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_delete(struct zip *za, zip_uint64_t idx) @@ -59,5 +59,3 @@ zip_delete(struct zip *za, zip_uint64_t idx) return 0; } - - diff --git a/src/thirdparty/libzip/zip_dirent.c b/src/thirdparty/libzip/zip_dirent.c index b5b9d273b..7f4aff826 100644 --- a/src/thirdparty/libzip/zip_dirent.c +++ b/src/thirdparty/libzip/zip_dirent.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -48,7 +48,7 @@ static char *_zip_readstr(unsigned char **, int, int, struct zip_error *); static void _zip_write2(unsigned short, FILE *); static void _zip_write4(unsigned int, FILE *); - + void _zip_cdir_free(struct zip_cdir *cd) @@ -65,7 +65,7 @@ _zip_cdir_free(struct zip_cdir *cd) free(cd); } - + int _zip_cdir_grow(struct zip_cdir *cd, int nentry, struct zip_error *error) @@ -89,7 +89,7 @@ _zip_cdir_grow(struct zip_cdir *cd, int nentry, struct zip_error *error) return 0; } - + struct zip_cdir * _zip_cdir_new(int nentry, struct zip_error *error) @@ -118,7 +118,7 @@ _zip_cdir_new(int nentry, struct zip_error *error) return cd; } - + int _zip_cdir_write(struct zip_cdir *cd, FILE *fp, struct zip_error *error) @@ -152,7 +152,7 @@ _zip_cdir_write(struct zip_cdir *cd, FILE *fp, struct zip_error *error) return 0; } - + void _zip_dirent_finalize(struct zip_dirent *zde) @@ -165,7 +165,7 @@ _zip_dirent_finalize(struct zip_dirent *zde) zde->comment = NULL; } - + void _zip_dirent_init(struct zip_dirent *de) @@ -190,7 +190,7 @@ _zip_dirent_init(struct zip_dirent *de) de->offset = 0; } - + /* _zip_dirent_read(zde, fp, bufp, left, localp, error): Fills the zip directory entry zde. @@ -346,7 +346,7 @@ _zip_dirent_read(struct zip_dirent *zde, FILE *fp, return 0; } - + /* _zip_dirent_torrent_normalize(de); Set values suitable for torrentzip. @@ -403,7 +403,7 @@ _zip_dirent_torrent_normalize(struct zip_dirent *de) de->comment_len = 0; } - + /* _zip_dirent_write(zde, fp, localp, error): Writes zip directory entry zde to file fp. @@ -467,7 +467,7 @@ _zip_dirent_write(struct zip_dirent *zde, FILE *fp, int localp, return 0; } - + static time_t _zip_d2u_time(int dtime, int ddate) @@ -490,7 +490,7 @@ _zip_d2u_time(int dtime, int ddate) return mktime(&tm); } - + unsigned short _zip_read2(unsigned char **a) @@ -503,7 +503,7 @@ _zip_read2(unsigned char **a) return ret; } - + unsigned int _zip_read4(unsigned char **a) @@ -516,7 +516,7 @@ _zip_read4(unsigned char **a) return ret; } - + static char * _zip_readfpstr(FILE *fp, unsigned int len, int nulp, struct zip_error *error) @@ -546,7 +546,7 @@ _zip_readfpstr(FILE *fp, unsigned int len, int nulp, struct zip_error *error) return r; } - + static char * _zip_readstr(unsigned char **buf, int len, int nulp, struct zip_error *error) @@ -573,7 +573,7 @@ _zip_readstr(unsigned char **buf, int len, int nulp, struct zip_error *error) return r; } - + static void _zip_write2(unsigned short i, FILE *fp) @@ -584,7 +584,7 @@ _zip_write2(unsigned short i, FILE *fp) return; } - + static void _zip_write4(unsigned int i, FILE *fp) @@ -597,7 +597,7 @@ _zip_write4(unsigned int i, FILE *fp) return; } - + void _zip_u2d_time(time_t time, unsigned short *dtime, unsigned short *ddate) diff --git a/src/thirdparty/libzip/zip_entry_free.c b/src/thirdparty/libzip/zip_entry_free.c index e8a77707f..f6e9330ca 100644 --- a/src/thirdparty/libzip/zip_entry_free.c +++ b/src/thirdparty/libzip/zip_entry_free.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + void _zip_entry_free(struct zip_entry *ze) diff --git a/src/thirdparty/libzip/zip_entry_new.c b/src/thirdparty/libzip/zip_entry_new.c index ad5d59975..974721908 100644 --- a/src/thirdparty/libzip/zip_entry_new.c +++ b/src/thirdparty/libzip/zip_entry_new.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + struct zip_entry * _zip_entry_new(struct zip *za) diff --git a/src/thirdparty/libzip/zip_err_str.c b/src/thirdparty/libzip/zip_err_str.c index 8fb60036e..bc7f850a3 100644 --- a/src/thirdparty/libzip/zip_err_str.c +++ b/src/thirdparty/libzip/zip_err_str.c @@ -5,7 +5,7 @@ #include "zipint.h" - + const char * const _zip_err_str[] = { "No error", diff --git a/src/thirdparty/libzip/zip_error.c b/src/thirdparty/libzip/zip_error.c index b8d907abf..e82b374c6 100644 --- a/src/thirdparty/libzip/zip_error.c +++ b/src/thirdparty/libzip/zip_error.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + void _zip_error_clear(struct zip_error *err) @@ -46,7 +46,7 @@ _zip_error_clear(struct zip_error *err) err->sys_err = 0; } - + void _zip_error_copy(struct zip_error *dst, struct zip_error *src) @@ -55,7 +55,7 @@ _zip_error_copy(struct zip_error *dst, struct zip_error *src) dst->sys_err = src->sys_err; } - + void _zip_error_fini(struct zip_error *err) @@ -64,7 +64,7 @@ _zip_error_fini(struct zip_error *err) err->str = NULL; } - + void _zip_error_get(struct zip_error *err, int *zep, int *sep) @@ -79,7 +79,7 @@ _zip_error_get(struct zip_error *err, int *zep, int *sep) } } - + void _zip_error_init(struct zip_error *err) @@ -89,7 +89,7 @@ _zip_error_init(struct zip_error *err) err->str = NULL; } - + void _zip_error_set(struct zip_error *err, int ze, int se) @@ -100,7 +100,7 @@ _zip_error_set(struct zip_error *err, int ze, int se) } } - + void _zip_error_set_from_source(struct zip_error *err, struct zip_source *src) diff --git a/src/thirdparty/libzip/zip_error_clear.c b/src/thirdparty/libzip/zip_error_clear.c index 364383ebe..a45a3fad3 100644 --- a/src/thirdparty/libzip/zip_error_clear.c +++ b/src/thirdparty/libzip/zip_error_clear.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_error_clear(struct zip *za) diff --git a/src/thirdparty/libzip/zip_error_get.c b/src/thirdparty/libzip/zip_error_get.c index 6d1c958c1..38cf5c315 100644 --- a/src/thirdparty/libzip/zip_error_get.c +++ b/src/thirdparty/libzip/zip_error_get.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_error_get(struct zip *za, int *zep, int *sep) diff --git a/src/thirdparty/libzip/zip_error_get_sys_type.c b/src/thirdparty/libzip/zip_error_get_sys_type.c index 6c6f38074..a58279501 100644 --- a/src/thirdparty/libzip/zip_error_get_sys_type.c +++ b/src/thirdparty/libzip/zip_error_get_sys_type.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_error_get_sys_type(int ze) diff --git a/src/thirdparty/libzip/zip_error_strerror.c b/src/thirdparty/libzip/zip_error_strerror.c index 3d0951cfb..37dc56347 100644 --- a/src/thirdparty/libzip/zip_error_strerror.c +++ b/src/thirdparty/libzip/zip_error_strerror.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -40,7 +40,7 @@ #include "zipint.h" - + const char * _zip_error_strerror(struct zip_error *err) diff --git a/src/thirdparty/libzip/zip_error_to_str.c b/src/thirdparty/libzip/zip_error_to_str.c index 11a0cd2bb..cbc1ef853 100644 --- a/src/thirdparty/libzip/zip_error_to_str.c +++ b/src/thirdparty/libzip/zip_error_to_str.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -40,7 +40,7 @@ #include "zipint.h" - + ZIP_EXTERN int zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se) diff --git a/src/thirdparty/libzip/zip_fclose.c b/src/thirdparty/libzip/zip_fclose.c index 8a15febff..fe5247d84 100644 --- a/src/thirdparty/libzip/zip_fclose.c +++ b/src/thirdparty/libzip/zip_fclose.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_fclose(struct zip_file *zf) diff --git a/src/thirdparty/libzip/zip_fdopen.c b/src/thirdparty/libzip/zip_fdopen.c index 60d76a458..ad8893276 100644 --- a/src/thirdparty/libzip/zip_fdopen.c +++ b/src/thirdparty/libzip/zip_fdopen.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" #ifdef ZIP_HAVE_UNISTD_H #include #endif - + ZIP_EXTERN struct zip * zip_fdopen(int fd_orig, int flags, int *zep) diff --git a/src/thirdparty/libzip/zip_file_error_clear.c b/src/thirdparty/libzip/zip_file_error_clear.c index ef6fa10e4..562fee1f7 100644 --- a/src/thirdparty/libzip/zip_file_error_clear.c +++ b/src/thirdparty/libzip/zip_file_error_clear.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_file_error_clear(struct zip_file *zf) diff --git a/src/thirdparty/libzip/zip_file_error_get.c b/src/thirdparty/libzip/zip_file_error_get.c index f20e011fc..58c69ee87 100644 --- a/src/thirdparty/libzip/zip_file_error_get.c +++ b/src/thirdparty/libzip/zip_file_error_get.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_file_error_get(struct zip_file *zf, int *zep, int *sep) diff --git a/src/thirdparty/libzip/zip_file_get_offset.c b/src/thirdparty/libzip/zip_file_get_offset.c index b96fd5e48..ee41636aa 100644 --- a/src/thirdparty/libzip/zip_file_get_offset.c +++ b/src/thirdparty/libzip/zip_file_get_offset.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -42,7 +42,7 @@ #include "zipint.h" - + /* _zip_file_get_offset(za, ze): Returns the offset of the file data for entry ze. diff --git a/src/thirdparty/libzip/zip_file_strerror.c b/src/thirdparty/libzip/zip_file_strerror.c index 9ba70f14f..509e2f3db 100644 --- a/src/thirdparty/libzip/zip_file_strerror.c +++ b/src/thirdparty/libzip/zip_file_strerror.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN const char * zip_file_strerror(struct zip_file *zf) diff --git a/src/thirdparty/libzip/zip_filerange_crc.c b/src/thirdparty/libzip/zip_filerange_crc.c index 4d1ad5669..2c383e72a 100644 --- a/src/thirdparty/libzip/zip_filerange_crc.c +++ b/src/thirdparty/libzip/zip_filerange_crc.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -39,7 +39,7 @@ #include "zipint.h" - + int _zip_filerange_crc(FILE *fp, off_t start, off_t len, uLong *crcp, diff --git a/src/thirdparty/libzip/zip_fopen.c b/src/thirdparty/libzip/zip_fopen.c index 5a65ebaec..483f28149 100644 --- a/src/thirdparty/libzip/zip_fopen.c +++ b/src/thirdparty/libzip/zip_fopen.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN struct zip_file * zip_fopen(struct zip *za, const char *fname, int flags) diff --git a/src/thirdparty/libzip/zip_fopen_encrypted.c b/src/thirdparty/libzip/zip_fopen_encrypted.c index 0a4b131ae..8292684f3 100644 --- a/src/thirdparty/libzip/zip_fopen_encrypted.c +++ b/src/thirdparty/libzip/zip_fopen_encrypted.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN struct zip_file * zip_fopen_encrypted(struct zip *za, const char *fname, int flags, diff --git a/src/thirdparty/libzip/zip_fopen_index.c b/src/thirdparty/libzip/zip_fopen_index.c index 3a58bbed9..d1ad8259b 100644 --- a/src/thirdparty/libzip/zip_fopen_index.c +++ b/src/thirdparty/libzip/zip_fopen_index.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -39,7 +39,7 @@ #include "zipint.h" - + ZIP_EXTERN struct zip_file * zip_fopen_index(struct zip *za, zip_uint64_t fileno, int flags) diff --git a/src/thirdparty/libzip/zip_fopen_index_encrypted.c b/src/thirdparty/libzip/zip_fopen_index_encrypted.c index 2e617bf1e..49c0d6ed8 100644 --- a/src/thirdparty/libzip/zip_fopen_index_encrypted.c +++ b/src/thirdparty/libzip/zip_fopen_index_encrypted.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -41,7 +41,7 @@ static struct zip_file *_zip_file_new(struct zip *za); - + ZIP_EXTERN struct zip_file * zip_fopen_index_encrypted(struct zip *za, zip_uint64_t fileno, int flags, @@ -154,7 +154,7 @@ zip_fopen_index_encrypted(struct zip *za, zip_uint64_t fileno, int flags, return zf; } - + static struct zip_file * _zip_file_new(struct zip *za) diff --git a/src/thirdparty/libzip/zip_fread.c b/src/thirdparty/libzip/zip_fread.c index 8235c6dfa..901e2f102 100644 --- a/src/thirdparty/libzip/zip_fread.c +++ b/src/thirdparty/libzip/zip_fread.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN zip_int64_t zip_fread(struct zip_file *zf, void *outbuf, zip_uint64_t toread) diff --git a/src/thirdparty/libzip/zip_free.c b/src/thirdparty/libzip/zip_free.c index 9932c14fe..3122a5133 100644 --- a/src/thirdparty/libzip/zip_free.c +++ b/src/thirdparty/libzip/zip_free.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + /* _zip_free: frees the space allocated to a zipfile struct, and closes the diff --git a/src/thirdparty/libzip/zip_get_archive_comment.c b/src/thirdparty/libzip/zip_get_archive_comment.c index 669eb7021..ef798cfba 100644 --- a/src/thirdparty/libzip/zip_get_archive_comment.c +++ b/src/thirdparty/libzip/zip_get_archive_comment.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN const char * zip_get_archive_comment(struct zip *za, int *lenp, int flags) diff --git a/src/thirdparty/libzip/zip_get_archive_flag.c b/src/thirdparty/libzip/zip_get_archive_flag.c index 4733d92b5..64e415898 100644 --- a/src/thirdparty/libzip/zip_get_archive_flag.c +++ b/src/thirdparty/libzip/zip_get_archive_flag.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_get_archive_flag(struct zip *za, int flag, int flags) diff --git a/src/thirdparty/libzip/zip_get_compression_implementation.c b/src/thirdparty/libzip/zip_get_compression_implementation.c index 8d4ccb69a..c48045b45 100644 --- a/src/thirdparty/libzip/zip_get_compression_implementation.c +++ b/src/thirdparty/libzip/zip_get_compression_implementation.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN zip_compression_implementation zip_get_compression_implementation(zip_uint16_t cm) diff --git a/src/thirdparty/libzip/zip_get_encryption_implementation.c b/src/thirdparty/libzip/zip_get_encryption_implementation.c index d83698c86..49fbaca2f 100644 --- a/src/thirdparty/libzip/zip_get_encryption_implementation.c +++ b/src/thirdparty/libzip/zip_get_encryption_implementation.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN zip_encryption_implementation zip_get_encryption_implementation(zip_uint16_t em) diff --git a/src/thirdparty/libzip/zip_get_file_comment.c b/src/thirdparty/libzip/zip_get_file_comment.c index b9dacbe5f..886bedc08 100644 --- a/src/thirdparty/libzip/zip_get_file_comment.c +++ b/src/thirdparty/libzip/zip_get_file_comment.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN const char * zip_get_file_comment(struct zip *za, zip_uint64_t idx, int *lenp, int flags) diff --git a/src/thirdparty/libzip/zip_get_name.c b/src/thirdparty/libzip/zip_get_name.c index 531af5029..b74299379 100644 --- a/src/thirdparty/libzip/zip_get_name.c +++ b/src/thirdparty/libzip/zip_get_name.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN const char * zip_get_name(struct zip *za, zip_uint64_t idx, int flags) @@ -43,7 +43,7 @@ zip_get_name(struct zip *za, zip_uint64_t idx, int flags) return _zip_get_name(za, idx, flags, &za->error); } - + const char * _zip_get_name(struct zip *za, zip_uint64_t idx, int flags, diff --git a/src/thirdparty/libzip/zip_get_num_entries.c b/src/thirdparty/libzip/zip_get_num_entries.c index 83293e955..7da9a74b7 100644 --- a/src/thirdparty/libzip/zip_get_num_entries.c +++ b/src/thirdparty/libzip/zip_get_num_entries.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN zip_uint64_t zip_get_num_entries(struct zip *za, int flags) diff --git a/src/thirdparty/libzip/zip_get_num_files.c b/src/thirdparty/libzip/zip_get_num_files.c index 1d9baa3d6..740c509fe 100644 --- a/src/thirdparty/libzip/zip_get_num_files.c +++ b/src/thirdparty/libzip/zip_get_num_files.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_get_num_files(struct zip *za) diff --git a/src/thirdparty/libzip/zip_memdup.c b/src/thirdparty/libzip/zip_memdup.c index 641125ed2..fa9bc6f3a 100644 --- a/src/thirdparty/libzip/zip_memdup.c +++ b/src/thirdparty/libzip/zip_memdup.c @@ -36,7 +36,7 @@ #include "zipint.h" - + void * _zip_memdup(const void *mem, size_t len, struct zip_error *error) diff --git a/src/thirdparty/libzip/zip_name_locate.c b/src/thirdparty/libzip/zip_name_locate.c index 89cc15922..0849353d4 100644 --- a/src/thirdparty/libzip/zip_name_locate.c +++ b/src/thirdparty/libzip/zip_name_locate.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_name_locate(struct zip *za, const char *fname, int flags) @@ -45,7 +45,7 @@ zip_name_locate(struct zip *za, const char *fname, int flags) return _zip_name_locate(za, fname, flags, &za->error); } - + int _zip_name_locate(struct zip *za, const char *fname, int flags, diff --git a/src/thirdparty/libzip/zip_new.c b/src/thirdparty/libzip/zip_new.c index 7ce1237cd..81bb4a746 100644 --- a/src/thirdparty/libzip/zip_new.c +++ b/src/thirdparty/libzip/zip_new.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + /* _zip_new: creates a new zipfile struct, and sets the contents to zero; returns diff --git a/src/thirdparty/libzip/zip_open.c b/src/thirdparty/libzip/zip_open.c index 015c91e44..05821c1d0 100644 --- a/src/thirdparty/libzip/zip_open.c +++ b/src/thirdparty/libzip/zip_open.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -55,7 +55,7 @@ static unsigned char *_zip_memmem(const unsigned char *, int, static struct zip_cdir *_zip_readcdir(FILE *, off_t, unsigned char *, unsigned char *, int, int, struct zip_error *); - + ZIP_EXTERN struct zip * zip_open(const char *fn, int flags, int *zep) @@ -79,7 +79,7 @@ zip_open(const char *fn, int flags, int *zep) return _zip_open(fn, fp, flags, 0, zep); } - + struct zip * _zip_open(const char *fn, FILE *fp, int flags, int aflags, int *zep) @@ -134,7 +134,7 @@ _zip_open(const char *fn, FILE *fp, int flags, int aflags, int *zep) return za; } - + static void set_error(int *zep, struct zip_error *err, int ze) @@ -151,7 +151,7 @@ set_error(int *zep, struct zip_error *err, int ze) *zep = ze; } - + /* _zip_readcdir: tries to find a valid end-of-central-directory at the beginning of @@ -281,7 +281,7 @@ _zip_readcdir(FILE *fp, off_t buf_offset, unsigned char *buf, unsigned char *eoc return cd; } - + /* _zip_checkcons: Checks the consistency of the central directory by comparing central @@ -339,7 +339,7 @@ _zip_checkcons(FILE *fp, struct zip_cdir *cd, struct zip_error *error) return max - min; } - + /* _zip_check_torrentzip: check wether ZA has a valid TORRENTZIP comment, i.e. is torrentzipped */ @@ -374,7 +374,7 @@ _zip_check_torrentzip(struct zip *za) } - + /* _zip_headercomp: compares two headers h1 and h2; if they are local headers, set @@ -443,7 +443,7 @@ _zip_headercomp(struct zip_dirent *h1, int local1p, struct zip_dirent *h2, return 0; } - + static struct zip * _zip_allocate_new(const char *fn, int *zep) @@ -469,7 +469,7 @@ _zip_allocate_new(const char *fn, int *zep) return za; } - + static int _zip_file_exists(const char *fn, int flags, int *zep) @@ -499,7 +499,7 @@ _zip_file_exists(const char *fn, int flags, int *zep) return 1; } - + static struct zip_cdir * _zip_find_central_dir(FILE *fp, int flags, int *zep, off_t len) @@ -580,7 +580,7 @@ _zip_find_central_dir(FILE *fp, int flags, int *zep, off_t len) return cdir; } - + static unsigned char * _zip_memmem(const unsigned char *big, int biglen, const unsigned char *little, diff --git a/src/thirdparty/libzip/zip_rename.c b/src/thirdparty/libzip/zip_rename.c index d78bbe8bc..e1911c363 100644 --- a/src/thirdparty/libzip/zip_rename.c +++ b/src/thirdparty/libzip/zip_rename.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_rename(struct zip *za, zip_uint64_t idx, const char *name) diff --git a/src/thirdparty/libzip/zip_replace.c b/src/thirdparty/libzip/zip_replace.c index c444e78dc..5e2789aed 100644 --- a/src/thirdparty/libzip/zip_replace.c +++ b/src/thirdparty/libzip/zip_replace.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source) @@ -52,7 +52,7 @@ zip_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source) } - + /* NOTE: Signed due to -1 on error. See zip_add.c for more details. */ diff --git a/src/thirdparty/libzip/zip_set_archive_comment.c b/src/thirdparty/libzip/zip_set_archive_comment.c index 3bb85d10e..c74c197a9 100644 --- a/src/thirdparty/libzip/zip_set_archive_comment.c +++ b/src/thirdparty/libzip/zip_set_archive_comment.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_set_archive_comment(struct zip *za, const char *comment, int len) diff --git a/src/thirdparty/libzip/zip_set_archive_flag.c b/src/thirdparty/libzip/zip_set_archive_flag.c index e0e713a41..f7092ed5a 100644 --- a/src/thirdparty/libzip/zip_set_archive_flag.c +++ b/src/thirdparty/libzip/zip_set_archive_flag.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_set_archive_flag(struct zip *za, int flag, int value) diff --git a/src/thirdparty/libzip/zip_set_default_password.c b/src/thirdparty/libzip/zip_set_default_password.c index b9aa80acf..0e4ee285e 100644 --- a/src/thirdparty/libzip/zip_set_default_password.c +++ b/src/thirdparty/libzip/zip_set_default_password.c @@ -31,14 +31,14 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include #include "zipint.h" - + ZIP_EXTERN int zip_set_default_password(struct zip *za, const char *passwd) diff --git a/src/thirdparty/libzip/zip_set_file_comment.c b/src/thirdparty/libzip/zip_set_file_comment.c index 6ae76a0c3..ecfb1a718 100644 --- a/src/thirdparty/libzip/zip_set_file_comment.c +++ b/src/thirdparty/libzip/zip_set_file_comment.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_set_file_comment(struct zip *za, zip_uint64_t idx, diff --git a/src/thirdparty/libzip/zip_set_name.c b/src/thirdparty/libzip/zip_set_name.c index 2a90601bf..1d92db5f4 100644 --- a/src/thirdparty/libzip/zip_set_name.c +++ b/src/thirdparty/libzip/zip_set_name.c @@ -31,14 +31,14 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include #include "zipint.h" - + int _zip_set_name(struct zip *za, zip_uint64_t idx, const char *name) diff --git a/src/thirdparty/libzip/zip_source_buffer.c b/src/thirdparty/libzip/zip_source_buffer.c index af8bf1939..95e3fea9b 100644 --- a/src/thirdparty/libzip/zip_source_buffer.c +++ b/src/thirdparty/libzip/zip_source_buffer.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -46,7 +46,7 @@ struct read_data { static zip_int64_t read_data(void *, void *, zip_uint64_t, enum zip_source_cmd); - + ZIP_EXTERN struct zip_source * zip_source_buffer(struct zip *za, const void *data, zip_uint64_t len, int freep) @@ -80,7 +80,7 @@ zip_source_buffer(struct zip *za, const void *data, zip_uint64_t len, int freep) return zs; } - + static zip_int64_t read_data(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd) diff --git a/src/thirdparty/libzip/zip_source_close.c b/src/thirdparty/libzip/zip_source_close.c index 882a1997b..d2eeca214 100644 --- a/src/thirdparty/libzip/zip_source_close.c +++ b/src/thirdparty/libzip/zip_source_close.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_source_close(struct zip_source *src) diff --git a/src/thirdparty/libzip/zip_source_crc.c b/src/thirdparty/libzip/zip_source_crc.c index 59e8a1959..b2ae9dfeb 100644 --- a/src/thirdparty/libzip/zip_source_crc.c +++ b/src/thirdparty/libzip/zip_source_crc.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -49,7 +49,7 @@ struct crc { static zip_int64_t crc_read(struct zip_source *, void *, void * , zip_uint64_t, enum zip_source_cmd); - + ZIP_EXTERN struct zip_source * zip_source_crc(struct zip *za, struct zip_source *src, int validate) @@ -71,7 +71,7 @@ zip_source_crc(struct zip *za, struct zip_source *src, int validate) return zip_source_layered(za, src, crc_read, ctx); } - + static zip_int64_t crc_read(struct zip_source *src, void *_ctx, void *data, diff --git a/src/thirdparty/libzip/zip_source_deflate.c b/src/thirdparty/libzip/zip_source_deflate.c index 0cbcd7ca7..50ec61cf0 100644 --- a/src/thirdparty/libzip/zip_source_deflate.c +++ b/src/thirdparty/libzip/zip_source_deflate.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -58,7 +58,7 @@ static zip_int64_t deflate_decompress(struct zip_source *, void *, void *, zip_uint64_t, enum zip_source_cmd); static void deflate_free(struct deflate *); - + ZIP_EXTERN struct zip_source * zip_source_deflate(struct zip *za, struct zip_source *src, @@ -97,7 +97,7 @@ zip_source_deflate(struct zip *za, struct zip_source *src, return s2; } - + static zip_int64_t compress_read(struct zip_source *src, struct deflate *ctx, @@ -172,7 +172,7 @@ compress_read(struct zip_source *src, struct deflate *ctx, return (ctx->e[0] == 0) ? 0 : -1; } - + static zip_int64_t decompress_read(struct zip_source *src, struct deflate *ctx, @@ -242,7 +242,7 @@ decompress_read(struct zip_source *src, struct deflate *ctx, return (ctx->e[0] == 0) ? 0 : -1; } - + static zip_int64_t deflate_compress(struct zip_source *src, void *ud, void *data, @@ -313,7 +313,7 @@ deflate_compress(struct zip_source *src, void *ud, void *data, } } - + static zip_int64_t deflate_decompress(struct zip_source *src, void *ud, void *data, @@ -384,7 +384,7 @@ deflate_decompress(struct zip_source *src, void *ud, void *data, } - + static void deflate_free(struct deflate *ctx) diff --git a/src/thirdparty/libzip/zip_source_error.c b/src/thirdparty/libzip/zip_source_error.c index 433b450b6..8eb712147 100644 --- a/src/thirdparty/libzip/zip_source_error.c +++ b/src/thirdparty/libzip/zip_source_error.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_source_error(struct zip_source *src, int *ze, int *se) diff --git a/src/thirdparty/libzip/zip_source_file.c b/src/thirdparty/libzip/zip_source_file.c index 79c8ee5ac..8ebe518d8 100644 --- a/src/thirdparty/libzip/zip_source_file.c +++ b/src/thirdparty/libzip/zip_source_file.c @@ -31,14 +31,14 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include #include "zipint.h" - + ZIP_EXTERN struct zip_source * zip_source_file(struct zip *za, const char *fname, zip_uint64_t start, diff --git a/src/thirdparty/libzip/zip_source_filep.c b/src/thirdparty/libzip/zip_source_filep.c index 7e26ff6c5..7401e462b 100644 --- a/src/thirdparty/libzip/zip_source_filep.c +++ b/src/thirdparty/libzip/zip_source_filep.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -56,7 +56,7 @@ struct read_file { static zip_int64_t read_file(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd); - + ZIP_EXTERN struct zip_source * zip_source_filep(struct zip *za, FILE *file, zip_uint64_t start, @@ -73,7 +73,7 @@ zip_source_filep(struct zip *za, FILE *file, zip_uint64_t start, return _zip_source_file_or_p(za, NULL, file, start, len, 1, NULL); } - + struct zip_source * _zip_source_file_or_p(struct zip *za, const char *fname, FILE *file, @@ -118,7 +118,7 @@ _zip_source_file_or_p(struct zip *za, const char *fname, FILE *file, return zs; } - + static zip_int64_t read_file(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd) diff --git a/src/thirdparty/libzip/zip_source_free.c b/src/thirdparty/libzip/zip_source_free.c index b1e784049..1027234d0 100644 --- a/src/thirdparty/libzip/zip_source_free.c +++ b/src/thirdparty/libzip/zip_source_free.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN void zip_source_free(struct zip_source *src) diff --git a/src/thirdparty/libzip/zip_source_function.c b/src/thirdparty/libzip/zip_source_function.c index cb92e339b..64b91d307 100644 --- a/src/thirdparty/libzip/zip_source_function.c +++ b/src/thirdparty/libzip/zip_source_function.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN struct zip_source * zip_source_function(struct zip *za, zip_source_callback zcb, void *ud) @@ -56,7 +56,7 @@ zip_source_function(struct zip *za, zip_source_callback zcb, void *ud) return zs; } - + struct zip_source * _zip_source_new(struct zip *za) diff --git a/src/thirdparty/libzip/zip_source_layered.c b/src/thirdparty/libzip/zip_source_layered.c index 9bdf3c5ae..f1ef20d77 100644 --- a/src/thirdparty/libzip/zip_source_layered.c +++ b/src/thirdparty/libzip/zip_source_layered.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN struct zip_source * zip_source_layered(struct zip *za, struct zip_source *src, diff --git a/src/thirdparty/libzip/zip_source_open.c b/src/thirdparty/libzip/zip_source_open.c index a279e20b7..d22fe7e1b 100644 --- a/src/thirdparty/libzip/zip_source_open.c +++ b/src/thirdparty/libzip/zip_source_open.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_source_open(struct zip_source *src) diff --git a/src/thirdparty/libzip/zip_source_pkware.c b/src/thirdparty/libzip/zip_source_pkware.c index 21f4be4f9..11accd1b8 100644 --- a/src/thirdparty/libzip/zip_source_pkware.c +++ b/src/thirdparty/libzip/zip_source_pkware.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -53,7 +53,7 @@ static const uLongf *crc = NULL; #define CRC32(c, b) (crc[((c) ^ (b)) & 0xff] ^ ((c) >> 8)) - + static void decrypt(struct trad_pkware *, zip_uint8_t *, const zip_uint8_t *, zip_uint64_t, int); @@ -62,7 +62,7 @@ static zip_int64_t pkware_decrypt(struct zip_source *, void *, void *, zip_uint64_t, enum zip_source_cmd); static void pkware_free(struct trad_pkware *); - + ZIP_EXTERN struct zip_source * zip_source_pkware(struct zip *za, struct zip_source *src, @@ -103,7 +103,7 @@ zip_source_pkware(struct zip *za, struct zip_source *src, return s2; } - + static void decrypt(struct trad_pkware *ctx, zip_uint8_t *out, const zip_uint8_t *in, @@ -135,7 +135,7 @@ decrypt(struct trad_pkware *ctx, zip_uint8_t *out, const zip_uint8_t *in, } } - + static int decrypt_header(struct zip_source *src, struct trad_pkware *ctx) @@ -175,7 +175,7 @@ decrypt_header(struct zip_source *src, struct trad_pkware *ctx) return 0; } - + static zip_int64_t pkware_decrypt(struct zip_source *src, void *ud, void *data, @@ -232,7 +232,7 @@ pkware_decrypt(struct zip_source *src, void *ud, void *data, } } - + static void pkware_free(struct trad_pkware *ctx) diff --git a/src/thirdparty/libzip/zip_source_pop.c b/src/thirdparty/libzip/zip_source_pop.c index 88d37da51..41a289a97 100644 --- a/src/thirdparty/libzip/zip_source_pop.c +++ b/src/thirdparty/libzip/zip_source_pop.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN struct zip_source * zip_source_pop(struct zip_source *src) diff --git a/src/thirdparty/libzip/zip_source_read.c b/src/thirdparty/libzip/zip_source_read.c index 432243b44..1db12954f 100644 --- a/src/thirdparty/libzip/zip_source_read.c +++ b/src/thirdparty/libzip/zip_source_read.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN zip_int64_t zip_source_read(struct zip_source *src, void *data, zip_uint64_t len) diff --git a/src/thirdparty/libzip/zip_source_stat.c b/src/thirdparty/libzip/zip_source_stat.c index 2166074d2..2f7ddac0b 100644 --- a/src/thirdparty/libzip/zip_source_stat.c +++ b/src/thirdparty/libzip/zip_source_stat.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_source_stat(struct zip_source *src, struct zip_stat *st) diff --git a/src/thirdparty/libzip/zip_source_zip.c b/src/thirdparty/libzip/zip_source_zip.c index 2b9061f0c..1ca8159ff 100644 --- a/src/thirdparty/libzip/zip_source_zip.c +++ b/src/thirdparty/libzip/zip_source_zip.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include @@ -48,7 +48,7 @@ struct read_zip { static zip_int64_t read_zip(void *st, void *data, zip_uint64_t len, enum zip_source_cmd cmd); - + ZIP_EXTERN struct zip_source * zip_source_zip(struct zip *za, struct zip *srcza, zip_uint64_t srcidx, @@ -114,7 +114,7 @@ zip_source_zip(struct zip *za, struct zip *srcza, zip_uint64_t srcidx, return zs; } - + static zip_int64_t read_zip(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd) diff --git a/src/thirdparty/libzip/zip_stat.c b/src/thirdparty/libzip/zip_stat.c index df1c0b50b..1df94b5aa 100644 --- a/src/thirdparty/libzip/zip_stat.c +++ b/src/thirdparty/libzip/zip_stat.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_stat(struct zip *za, const char *fname, int flags, struct zip_stat *st) diff --git a/src/thirdparty/libzip/zip_stat_index.c b/src/thirdparty/libzip/zip_stat_index.c index 0e15b5577..56fd9864b 100644 --- a/src/thirdparty/libzip/zip_stat_index.c +++ b/src/thirdparty/libzip/zip_stat_index.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN int zip_stat_index(struct zip *za, zip_uint64_t index, int flags, diff --git a/src/thirdparty/libzip/zip_stat_init.c b/src/thirdparty/libzip/zip_stat_init.c index d17613bf5..01fa385aa 100644 --- a/src/thirdparty/libzip/zip_stat_init.c +++ b/src/thirdparty/libzip/zip_stat_init.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN void zip_stat_init(struct zip_stat *st) diff --git a/src/thirdparty/libzip/zip_strerror.c b/src/thirdparty/libzip/zip_strerror.c index 9ebee144f..8ca5c9f7e 100644 --- a/src/thirdparty/libzip/zip_strerror.c +++ b/src/thirdparty/libzip/zip_strerror.c @@ -31,11 +31,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "zipint.h" - + ZIP_EXTERN const char * zip_strerror(struct zip *za) diff --git a/src/thirdparty/libzip/zip_unchange.c b/src/thirdparty/libzip/zip_unchange.c index e64186ed6..907dddc14 100644 --- a/src/thirdparty/libzip/zip_unchange.c +++ b/src/thirdparty/libzip/zip_unchange.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_unchange(struct zip *za, zip_uint64_t idx) @@ -45,7 +45,7 @@ zip_unchange(struct zip *za, zip_uint64_t idx) return _zip_unchange(za, idx, 0); } - + int _zip_unchange(struct zip *za, zip_uint64_t idx, int allow_duplicates) diff --git a/src/thirdparty/libzip/zip_unchange_all.c b/src/thirdparty/libzip/zip_unchange_all.c index 54a7a0d2e..f5a5ef323 100644 --- a/src/thirdparty/libzip/zip_unchange_all.c +++ b/src/thirdparty/libzip/zip_unchange_all.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_unchange_all(struct zip *za) diff --git a/src/thirdparty/libzip/zip_unchange_archive.c b/src/thirdparty/libzip/zip_unchange_archive.c index 8f9c024c3..faa804958 100644 --- a/src/thirdparty/libzip/zip_unchange_archive.c +++ b/src/thirdparty/libzip/zip_unchange_archive.c @@ -31,13 +31,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include #include "zipint.h" - + ZIP_EXTERN int zip_unchange_archive(struct zip *za) diff --git a/src/thirdparty/libzip/zip_unchange_data.c b/src/thirdparty/libzip/zip_unchange_data.c index 431f2d0c0..183a7fc10 100644 --- a/src/thirdparty/libzip/zip_unchange_data.c +++ b/src/thirdparty/libzip/zip_unchange_data.c @@ -31,7 +31,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include diff --git a/src/thirdparty/libzip/zipint.h b/src/thirdparty/libzip/zipint.h index 43cbfa8ff..b9217b462 100644 --- a/src/thirdparty/libzip/zipint.h +++ b/src/thirdparty/libzip/zipint.h @@ -94,7 +94,7 @@ int _zip_mkstemp(char *); #endif #endif - + #define CENTRAL_MAGIC "PK\1\2" #define LOCAL_MAGIC "PK\3\4" @@ -112,7 +112,7 @@ int _zip_mkstemp(char *); #define CDBUFSIZE (MAXCOMLEN+EOCDLEN) #define BUFSIZE 8192 - + /* This section contains API that won't materialize like this. It's placed in the internal section, pending cleanup. */ @@ -131,7 +131,7 @@ ZIP_EXTERN zip_encryption_implementation zip_get_encryption_implementation( zip_uint16_t); - + /* This section contains API that is of limited use until support for user-supplied compression/encryption implementation is finished. @@ -168,7 +168,7 @@ ZIP_EXTERN int zip_source_stat(struct zip_source *, struct zip_stat *); ZIP_EXTERN struct zip_source *zip_source_pop(struct zip_source *); - + /* state of change of a file in zip archive */ @@ -261,7 +261,7 @@ struct zip_cdir { unsigned short comment_len; /* length of zip archive comment */ }; - + struct zip_source { struct zip_source *src; @@ -286,13 +286,13 @@ struct zip_entry { int ch_comment_len; }; - + extern const char * const _zip_err_str[]; extern const int _zip_nerr_str; extern const int _zip_err_type[]; - + #define ZIP_ENTRY_DATA_CHANGED(x) \ ((x)->state == ZIP_ST_REPLACED \ @@ -300,7 +300,7 @@ extern const int _zip_err_type[]; #define ZIP_IS_RDONLY(za) ((za)->ch_flags & ZIP_AFL_RDONLY) - + int _zip_cdir_compute_crc(struct zip *, uLong *); void _zip_cdir_free(struct zip_cdir *);