diff options
author | zeripath <art27@cantab.net> | 2020-06-02 23:20:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 19:20:19 -0300 |
commit | a1ad188326f9af633d2be0920a140275a4972bfe (patch) | |
tree | f8d3df4a5e43b9e4db91947e7948520f27a89a50 /modules/charset/charset_test.go | |
parent | fe2cacf5ea2e371c4e74f003ee594767c16028fa (diff) | |
download | gitea-a1ad188326f9af633d2be0920a140275a4972bfe.tar.gz gitea-a1ad188326f9af633d2be0920a140275a4972bfe.zip |
Fix chardet test and add ordering option (#11621)
* Fix chardet test and add ordering option
Signed-off-by: Andrew Thornton <art27@cantab.net>
* minor fixes
Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove log
Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove log2
Signed-off-by: Andrew Thornton <art27@cantab.net>
* only iterate through top results
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md
* slight restructure of for loop
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/charset/charset_test.go')
-rw-r--r-- | modules/charset/charset_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/charset/charset_test.go b/modules/charset/charset_test.go index a81a6e03ee..394a42c71f 100644 --- a/modules/charset/charset_test.go +++ b/modules/charset/charset_test.go @@ -230,7 +230,11 @@ func TestDetectEncoding(t *testing.T) { // we accept either. assert.Contains(t, encoding, "ISO-8859") + old := setting.Repository.AnsiCharset setting.Repository.AnsiCharset = "placeholder" + defer func() { + setting.Repository.AnsiCharset = old + }() testSuccess(b, "placeholder") // invalid bytes |