summaryrefslogtreecommitdiff
path: root/core/Stream.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Stream.zig')
-rw-r--r--core/Stream.zig16
1 files changed, 2 insertions, 14 deletions
diff --git a/core/Stream.zig b/core/Stream.zig
index 6f99b504..1f4a7405 100644
--- a/core/Stream.zig
+++ b/core/Stream.zig
@@ -478,7 +478,6 @@ fn parseWork(io: std.Io, job: *TextJob, ctx: ?*anyopaque, sink: Sink) void {
}
fn now() u64 {
- if (comptime !filesystem.platform_has_fs) return 0;
const t = std.Io.Clock.awake.now(std.Io.Threaded.global_single_threaded.io());
return @intCast(@max(0, t.nanoseconds));
}
@@ -635,10 +634,6 @@ pub fn runHere(p: *Pardes, gen: u32, comptime in_call: bool) void {
};
return;
}
- if (comptime !filesystem.platform_has_fs) {
- p.stream.state = .failed;
- return;
- }
const s = &p.stream;
if (gen != s.gen or s.state != .searching) return;
const job = makeJob(p.gpa, s) catch |err| {
@@ -1163,7 +1158,6 @@ const Rogue = struct {
};
test "Stream: a stale generation's rows never land in the query pane, however two generations race (walk and rg)" {
- if (comptime !filesystem.platform_has_fs) return;
var tmp = testing.tmpDir(.{});
defer tmp.cleanup();
var root_buf: [4096]u8 = undefined;
@@ -1243,7 +1237,6 @@ test "Stream: a stale generation's rows never land in the query pane, however tw
}
test "Stream: the listing of files for Find on a worker, a cap of hits stops the walk on the loop" {
- if (comptime !filesystem.platform_has_fs) return;
var tmp = testing.tmpDir(.{});
defer tmp.cleanup();
var root_buf: [4096]u8 = undefined;
@@ -1273,7 +1266,6 @@ test "Stream: the listing of files for Find on a worker, a cap of hits stops the
}
test "Stream: a big text's declarations are parsed on a worker, never the loop, and the rows of its / regroup under them" {
- if (comptime !filesystem.platform_has_fs) return;
const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 });
defer p.deinit();
var text: std.ArrayList(u8) = .empty;
@@ -1312,7 +1304,6 @@ test "Stream: a big text's declarations are parsed on a worker, never the loop,
}
test "Stream: a scroll's colours are painted ahead on a worker, so PageDown after PageDown parses nothing on the frame" {
- if (comptime !filesystem.platform_has_fs or !syntax.enabled) return;
const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 });
defer p.deinit();
var text: std.ArrayList(u8) = .empty;
@@ -1355,7 +1346,6 @@ test "Stream: a scroll's colours are painted ahead on a worker, so PageDown afte
}
test "Stream: a Grep stops at its 2000 lines and waits; More in the query pane's tag goes on" {
- if (comptime !filesystem.platform_has_fs) return;
var tmp = testing.tmpDir(.{});
defer tmp.cleanup();
var root_buf: [4096]u8 = undefined;
@@ -1404,8 +1394,7 @@ test "Stream: a Grep stops at its 2000 lines and waits; More in the query pane's
}
test "Stream: a Grep's rows recoloured are made again, never written, and a dump of them dropped by an edit loads to its digest" {
- if (comptime !filesystem.platform_has_fs) return;
- if (!syntax.enabled or !syntax.readyApart("c.zig")) return;
+ if (!syntax.readyApart("c.zig")) return;
var tmp = testing.tmpDir(.{});
defer tmp.cleanup();
// Rows enough that a digest keeps a word for them (walk's blob_min).
@@ -1476,8 +1465,7 @@ test "Stream: a Grep's rows recoloured are made again, never written, and a dump
}
test "Stream: a Grep's rows are coloured as their file's language colours them, the file painted on a worker, the match tint on top" {
- if (comptime !filesystem.platform_has_fs) return;
- if (!syntax.enabled or !syntax.readyApart("c.zig")) return;
+ if (!syntax.readyApart("c.zig")) return;
var tmp = testing.tmpDir(.{});
defer tmp.cleanup();
const text = "const std = @import(\"std\");\npub fn value() u32 {\n return 42; // value\n}\n";