change travis and coverage

pull/7/head
Matthieu Gomez 2018-07-07 11:27:01 -04:00
parent 5d535e3e06
commit 571738cb5c
4 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,10 @@
language: julia
julia:
- 0.7
- nightly
matrix:
allow_failures:
- julia: nightly
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("StringDistances"); Pkg.test("StringDistances"; coverage=true)'

View File

@ -1,4 +1,4 @@
[![StringDistances](http://pkg.julialang.org/badges/StringDistances_0.5.svg)](http://pkg.julialang.org/?pkg=StringDistances)
[![StringDistances](http://pkg.julialang.org/badges/StringDistances_0.7.svg)](http://pkg.julialang.org/?pkg=StringDistances)
[![Build Status](https://travis-ci.org/matthieugomez/StringDistances.jl.svg?branch=master)](https://travis-ci.org/matthieugomez/StringDistances.jl)
[![Coverage Status](https://coveralls.io/repos/matthieugomez/StringDistances.jl/badge.svg?branch=master)](https://coveralls.io/r/matthieugomez/StringDistances.jl?branch=master)

View File

@ -35,7 +35,7 @@ function matching_blocks!(x::Set{Tuple{Int, Int, Int}}, s1::AbstractString, s2::
s1before = SubString(s1, firstindex(s1), nextind(s1, 0, a[1]) - 1)
s2before = SubString(s2, firstindex(s2), nextind(s2, 0, a[2]) - 1)
matching_blocks!(x, s1before, s2before, start1, start2)
if (a[1] + a[3]) <= lastindex(s1) && (a[2] + a[3]) <= lastindex(s2)
if ((a[1] + a[3]) <= lastindex(s1)) & ((a[2] + a[3]) <= lastindex(s2))
s1after = SubString(s1, nextind(s1, 0, a[1] + a[3]), lastindex(s1))
s2after = SubString(s2, nextind(s2, 0, a[2] + a[3]), lastindex(s2))
matching_blocks!(x, s1after, s2after, start1 + a[1] + a[3] - 1, start2 + a[2] + a[3] - 1)

View File

@ -75,6 +75,7 @@ s = "HSINCHUANG"
@test compare(TokenMax(RatcliffObershelp()),"mariners vs angels", "") 0.0
@test compare(TokenMax(RatcliffObershelp()),"mariners", "mariner") 0.933333333333333
#@test_approx_eq compare(TokenSort(RatcliffObershelp()), graphemeiterator("New York Mets vs Atlanta Braves"), graphemeiterator("Atlanta Braves vs New York Mets")) 1.0
#@test_approx_eq compare(TokenSet(RatcliffObershelp()),graphemeiterator("mariners vs angels"), graphemeiterator("los angeles angels of anaheim at seattle mariners")) 1.0 - 0.09090909090909094