Splits in two steps
This commit is contained in:
4
bd.go
4
bd.go
@@ -35,6 +35,10 @@ type Album struct {
|
||||
PrintDate time.Time
|
||||
}
|
||||
|
||||
func sanitizeTitleString(title string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (*Album) GetBedethequeComURI() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
35
bd_test.go
35
bd_test.go
@@ -12,6 +12,25 @@ type AlbumSuite struct{}
|
||||
|
||||
var _ = Suite(&AlbumSuite{})
|
||||
|
||||
func (s *AlbumSuite) TestSanitazation(c *C) {
|
||||
data := map[string]string{
|
||||
"Le cycle de l'eau - I": "Le-cycle-de-l-eau-I",
|
||||
"Nef des fous (La)": "Nef-des-fous",
|
||||
"Oiseau noir (L')": "Oiseau-Noir",
|
||||
"Foo": "Foo",
|
||||
"Nuit de l'étoile (La)": "Nuit-de-l-etoile",
|
||||
"Mon Père saigne l'Histoire": "Mon-Pere-saigne-l-Histoire",
|
||||
"Les disparus d'apostrophes !": "Les-disparus-d-apostrophes",
|
||||
"Eden - It's an Endless World!": "Eden-it-s-an-Endless-World",
|
||||
"100.000 femmes (Les)": "100000-femmes",
|
||||
}
|
||||
|
||||
for title, expected := range data {
|
||||
san := sanitizeTitleString(title)
|
||||
c.Check(san, Equals, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *AlbumSuite) TestBedecomURI(c *C) {
|
||||
data := map[string]Album{
|
||||
"BD-Okko-Tome-1-Le-cycle-de-l-eau-I-41693.html": Album{
|
||||
@@ -78,6 +97,22 @@ func (s *AlbumSuite) TestBedecomURI(c *C) {
|
||||
Num: 4,
|
||||
NumA: "",
|
||||
},
|
||||
"BD-Eden-It-s-an-Endless-World-Tome-4-Vengeance-19912.html": Album{
|
||||
ID: 19912,
|
||||
ISBN: "2845380429",
|
||||
Series: "Eden - It's an Endless World!",
|
||||
Title: "Vengeance",
|
||||
Num: 4,
|
||||
NumA: "",
|
||||
},
|
||||
"BD-100000-femmes-Tome-1-100000-femmes-les-175515.html": Album{
|
||||
ID: 175515,
|
||||
ISBN: "978-2-917456-30-9",
|
||||
Series: "100.000 femmes (Les)",
|
||||
Title: "100.000 femmes (les)",
|
||||
Num: 1,
|
||||
NumA: "",
|
||||
},
|
||||
}
|
||||
|
||||
for expectedUrl, album := range data {
|
||||
|
||||
Reference in New Issue
Block a user