mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-05 02:10:18 +01:00
32 lines
672 B
Go
32 lines
672 B
Go
|
// Copyright 2013 The Go Authors. All rights reserved.
|
||
|
//
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file or at
|
||
|
// https://developers.google.com/open-source/licenses/bsd.
|
||
|
|
||
|
package database
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
var stemTests = []struct {
|
||
|
s, expected string
|
||
|
}{
|
||
|
{"html", "html"},
|
||
|
{"strings", "string"},
|
||
|
{"ballroom", "ballroom"},
|
||
|
{"mechanicalization", "mech"},
|
||
|
{"pragmaticality", "pragm"},
|
||
|
{"rationalistically", "rat"},
|
||
|
}
|
||
|
|
||
|
func TestStem(t *testing.T) {
|
||
|
for _, tt := range stemTests {
|
||
|
actual := stem(tt.s)
|
||
|
if actual != tt.expected {
|
||
|
t.Errorf("stem(%q) = %q, want %q", tt.s, actual, tt.expected)
|
||
|
}
|
||
|
}
|
||
|
}
|