Skip to content

Commit 9211496

Browse files
committed
add single file test
1 parent 0033b22 commit 9211496

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

queries/test.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(if_statement (block))

tester/test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#! /usr/bin/env dcli
22

33
import 'dart:io';
4+
45
// import 'package:dcli/dcli.dart';
56
import 'package:path/path.dart';
67

@@ -15,6 +16,11 @@ void main(List<String> args) async {
1516
"Usage: dart tester/test.dart /path/to/directory/for/testing parse/highlight/query [query.scm]");
1617
return;
1718
}
19+
if (File(args[0]).existsSync()) {
20+
await runTreeSitterSingle(
21+
[args[0]], args[1], args.length == 3 ? args[2] : null);
22+
return;
23+
}
1824
final files = Directory(args[0])
1925
.listSync(recursive: true)
2026
.whereType<File>()

0 commit comments

Comments
 (0)