-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #473 from mrjones2014/mrj/472/fix-db-ids
fix(frecency)!: Use byte strings for DB IDs
- Loading branch information
Showing
7 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,13 @@ ensure-test-deps: | |
@mkdir -p vendor | ||
@if test ! -d ./vendor/plenary.nvim; then git clone [email protected]:nvim-lua/plenary.nvim.git ./vendor/plenary.nvim/; fi | ||
@if test ! -d ./vendor/luassert; then git clone [email protected]:Olivine-Labs/luassert.git ./vendor/luassert/; fi | ||
@if test ! -d ./vendor/sqlite; then git clone [email protected]:kkharji/sqlite.lua.git ./vendor/sqlite/; fi | ||
|
||
.PHONY: update-test-deps | ||
update-test-deps: ensure-test-deps | ||
@cd ./vendor/plenary.nvim/ && git pull && cd .. | ||
@cd ./vendor/luassert/ && git pull && cd .. | ||
@cd ./vendor/sqlite/ && git pull && cd .. | ||
|
||
.PHONY: ensure-doc-deps | ||
ensure-doc-deps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local assert = require('luassert') | ||
local wrapper = require('legendary.api.db.wrapper') | ||
|
||
describe('to_bytes function', function() | ||
local test_data = { | ||
['test string'] = '11610111511632115116114105110103', | ||
['with icons '] = '119105116104321059911111011532243176138162238158168238153135', | ||
['with quote chars \'"'] = '11910511610432113117111116101329910497114115323934', | ||
['with emoji 🦀'] = '1191051161043210110911110610532240159166128', | ||
} | ||
for input, output in pairs(test_data) do | ||
it(string.format('for input `%s`, output should be "%s"', input, output), function() | ||
assert.are.same(wrapper.to_bytes(input), output) | ||
end) | ||
end | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters