diff options
| author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-06-19 22:05:33 +0200 |
|---|---|---|
| committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-06-19 22:05:33 +0200 |
| commit | e0871d7be63dd428d4a2b9a3db4e033894165cef (patch) | |
| tree | 9a844f267ec9ec99ba745680453b683dd73a6f5b /spec | |
| parent | 8996a5022fa82e5d5335f71580d0cd6b6d323c9b (diff) | |
| download | luasystem-e0871d7be63dd428d4a2b9a3db4e033894165cef.tar.gz luasystem-e0871d7be63dd428d4a2b9a3db4e033894165cef.tar.bz2 luasystem-e0871d7be63dd428d4a2b9a3db4e033894165cef.zip | |
add system.CODEPAGE_UTF8 for 65001 codepage
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/04-term_spec.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/04-term_spec.lua b/spec/04-term_spec.lua index d5b4eee..e888920 100644 --- a/spec/04-term_spec.lua +++ b/spec/04-term_spec.lua | |||
| @@ -8,7 +8,7 @@ describe("Terminal:", function() | |||
| 8 | 8 | ||
| 9 | setup(function() | 9 | setup(function() |
| 10 | wincodepage = system.getconsoleoutputcp() | 10 | wincodepage = system.getconsoleoutputcp() |
| 11 | assert(system.setconsoleoutputcp(65001)) -- set to UTF8 | 11 | assert(system.setconsoleoutputcp(system.CODEPAGE_UTF8)) -- set to UTF8 |
| 12 | end) | 12 | end) |
| 13 | 13 | ||
| 14 | teardown(function() | 14 | teardown(function() |
| @@ -346,8 +346,8 @@ describe("Terminal:", function() | |||
| 346 | end) | 346 | end) |
| 347 | 347 | ||
| 348 | local new_cp | 348 | local new_cp |
| 349 | if old_cp ~= 65001 then | 349 | if old_cp ~= system.CODEPAGE_UTF8 then |
| 350 | new_cp = 65001 -- set to UTF8 | 350 | new_cp = system.CODEPAGE_UTF8 -- set to UTF8 |
| 351 | else | 351 | else |
| 352 | new_cp = 850 -- another common one | 352 | new_cp = 850 -- another common one |
| 353 | end | 353 | end |
| @@ -403,8 +403,8 @@ describe("Terminal:", function() | |||
| 403 | end) | 403 | end) |
| 404 | 404 | ||
| 405 | local new_cp | 405 | local new_cp |
| 406 | if old_cp ~= 65001 then | 406 | if old_cp ~= system.CODEPAGE_UTF8 then |
| 407 | new_cp = 65001 -- set to UTF8 | 407 | new_cp = system.CODEPAGE_UTF8 -- set to UTF8 |
| 408 | else | 408 | else |
| 409 | new_cp = 850 -- another common one | 409 | new_cp = 850 -- another common one |
| 410 | end | 410 | end |
| @@ -578,8 +578,8 @@ describe("Terminal:", function() | |||
| 578 | 578 | ||
| 579 | -- get the console page... | 579 | -- get the console page... |
| 580 | local new_cp | 580 | local new_cp |
| 581 | if old_cp ~= 65001 then | 581 | if old_cp ~= system.CODEPAGE_UTF8 then |
| 582 | new_cp = 65001 -- set to UTF8 | 582 | new_cp = system.CODEPAGE_UTF8 -- set to UTF8 |
| 583 | else | 583 | else |
| 584 | new_cp = 850 -- another common one | 584 | new_cp = 850 -- another common one |
| 585 | end | 585 | end |
