diff options
author | sinanmohd <sinan@sinanmohd.com> | 2023-10-03 09:17:48 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2023-10-03 19:00:49 +0530 |
commit | 71f7b25ab3c8302972998714e98a5126cf1259e5 (patch) | |
tree | 62e6d1fb4beb45dc205d90780e0e03977694f6a9 | |
parent | 4173db8196a492e76f28d09946acee0e198ef3ad (diff) |
tests: fix, avoid matching on nil
-rwxr-xr-x | tests.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -32,7 +32,11 @@ local test_opensubtitles = function () ohash = '395787dbe5b42001' id = '5449593' - new_id = opensubtitles.search_ohash(ohash):match('%d*$') + new_id = opensubtitles.search_ohash(ohash) + if new_id then + new_id = new_id:match('%d*$') + end + if id ~= new_id then util.error('opensubtitles: id mismatch') errs = errs + 1 |