Skip to content

Commit

Permalink
Minimalistic tests for Romanian language data support
Browse files Browse the repository at this point in the history
  • Loading branch information
zgornel committed Oct 30, 2018
1 parent 4b92f63 commit 50c3da0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ lang = Languages.English()
@test length(stopwords(lang)) == 488
end

lang = Languages.Romanian()

@testset "wordlists $lang" begin
@test all(articles(lang) .== ["a", "aceea", "aceia", "acel", "ai", "ale",
"aoalea", "cea", "cei", "cel", "cele",
"lui", "nişte", "o", "un", "unei", "unor",
"unui", "unul"])
@test all(indefinite_articles(lang) .== ["lui", "nişte", "o", "un", "unei",
"unor", "unui", "unul"])
# Test that all indefinite articles are present in the articles
@test all(map(article->in(article, articles(lang)),
indefinite_articles(lang)))
@test isempty(definite_articles(lang))
@test length(prepositions(lang)) == 19
@test length(pronouns(lang)) == 257
@test length(stopwords(lang)) == 101
end

@testset "lang code" begin
@test Languages.from_code("ben") == Languages.Bengali()
@test Languages.from_code("Ben") == Languages.Bengali()
Expand Down

0 comments on commit 50c3da0

Please sign in to comment.