added categories, import export, settings

This commit is contained in:
davmar
2026-08-29 16:45:27 +02:00
parent 2a5a922aab
commit 732a0dc14a
30 changed files with 3700 additions and 167 deletions
+15
View File
@@ -0,0 +1,15 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:receipity/utils/fuzzy.dart';
void main() {
test('matches substrings and character subsequences', () {
expect(fuzzyMatch('melk', 'JUMBO BIO VOLLE MELK'), isTrue);
expect(fuzzyMatch('jb melk', 'JUMBO BIO VOLLE MELK'), isTrue);
expect(fuzzyMatch('aard', 'AARDBEIEN'), isTrue);
expect(fuzzyMatch('xyz', 'AARDBEIEN'), isFalse);
});
test('ranks closer matches higher', () {
expect(fuzzyScore('melk', 'MELK')! > fuzzyScore('melk', 'JUMBO BIO VOLLE MELK')!, isTrue);
});
}