diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-02-14 03:05:59 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-02-14 03:05:59 +0300 |
commit | 915c40f1eed6ba139323c0fa15eed4ed3792f34b (patch) | |
tree | b7e67604ea0451e2cc19f532a2c0954614eabd52 /telegram/utils_test.go | |
parent | 6cbfed824520e742532db502147d9c6bc524cc84 (diff) |
Add an asciiarrows option (for clients that do not support Unicode ones)v1.1.2
Diffstat (limited to 'telegram/utils_test.go')
-rw-r--r-- | telegram/utils_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/telegram/utils_test.go b/telegram/utils_test.go index c168757..a435ea9 100644 --- a/telegram/utils_test.go +++ b/telegram/utils_test.go @@ -497,7 +497,7 @@ func TestMessageToPrefix1(t *testing.T) { }, }, } - prefix := (&Client{}).messageToPrefix(&message, "") + prefix := (&Client{Session: &persistence.Session{}}).messageToPrefix(&message, "") if prefix != "➡ 42 | fwd: ziz" { t.Errorf("Wrong prefix: %v", prefix) } @@ -512,7 +512,7 @@ func TestMessageToPrefix2(t *testing.T) { }, }, } - prefix := (&Client{}).messageToPrefix(&message, "") + prefix := (&Client{Session: &persistence.Session{}}).messageToPrefix(&message, "") if prefix != "⬅ 56 | fwd: (zaz)" { t.Errorf("Wrong prefix: %v", prefix) } @@ -525,8 +525,8 @@ func TestMessageToPrefix3(t *testing.T) { Origin: &client.MessageForwardOriginChannel{}, }, } - prefix := (&Client{}).messageToPrefix(&message, "a.jpg") - if prefix != "⬅ 56 | fwd: | file: a.jpg" { + prefix := (&Client{Session: &persistence.Session{AsciiArrows: true}}).messageToPrefix(&message, "a.jpg") + if prefix != "< 56 | fwd: | file: a.jpg" { t.Errorf("Wrong prefix: %v", prefix) } } @@ -536,8 +536,8 @@ func TestMessageToPrefix4(t *testing.T) { Id: 23, IsOutgoing: true, } - prefix := (&Client{}).messageToPrefix(&message, "") - if prefix != "➡ 23" { + prefix := (&Client{Session: &persistence.Session{AsciiArrows: true}}).messageToPrefix(&message, "") + if prefix != "> 23" { t.Errorf("Wrong prefix: %v", prefix) } } |