mirror of
https://github.com/beetbox/beets.git
synced 2026-01-09 17:33:51 +01:00
PathQuery: simple utf8 comparison
Test usqge of SQL's substr() with a UTF8 example. The ideal would be to test with non-UTF8 code points, however it is impossible to perform such a query: queries can only be unicode or utf8.
This commit is contained in:
parent
6fc678e947
commit
e00d7b7ddc
1 changed files with 6 additions and 0 deletions
|
|
@ -474,6 +474,12 @@ class PathQueryTest(_common.LibTestCase, TestHelper, AssertsMixin):
|
|||
results = self.lib.items(q)
|
||||
self.assert_items_matched(results, ['path item', 'caps path'])
|
||||
|
||||
def test_utf8_bytes(self):
|
||||
self.add_album(path=b'/\xc3\xa0/b/c.mp3', title='latin byte')
|
||||
q = b'path:/\xc3\xa0/b/c.mp3'
|
||||
results = self.lib.items(q)
|
||||
self.assert_items_matched(results, ['latin byte'])
|
||||
|
||||
|
||||
class IntQueryTest(unittest.TestCase, TestHelper):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue