You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
299 B

4 years ago
  1. var test = require('tape')
  2. var bm = require('../bm')
  3. test("omg",function(t){
  4. t.equals(bm('abc','bc'),1)
  5. t.equals(bm('ababc','bc'),3)
  6. t.equals(bm('abc','de'),-1)
  7. t.equals(bm('123123412345','345'),9)
  8. t.equals(bm('aaaba','aaba'),1,'partial matches should not be skipped')
  9. t.end()
  10. })