mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
page numbering engine
This commit is contained in:
parent
5de856e579
commit
c5c988709d
9 changed files with 198 additions and 26 deletions
|
@ -13,24 +13,6 @@ package database
|
|||
|
||||
import "testing"
|
||||
|
||||
//
|
||||
// // go test github.com/documize/community/core/database -run TestVersionExtract
|
||||
// func TestVersionExtract(t *testing.T) {
|
||||
// ts(t, "5", 5)
|
||||
// ts(t, "45-0ubuntu0-12.12.3", 45)
|
||||
// ts(t, "untu0-12.12.3", 0)
|
||||
// ts(t, "junk-string", 0)
|
||||
// ts(t, "somethingstring", 0)
|
||||
// }
|
||||
//
|
||||
// func ts(t *testing.T, in string, out int) {
|
||||
// got := ExtractVersionNumber(in)
|
||||
//
|
||||
// if got != out {
|
||||
// t.Errorf("version input `%s` got `%d` expected `%d`\n", in, got, out)
|
||||
// }
|
||||
// }
|
||||
|
||||
// go test github.com/documize/community/core/database -run TestGetVersion
|
||||
func TestGetVersion(t *testing.T) {
|
||||
ts2(t, "5.7.10", []int{5, 7, 10})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue