- Add modern CLI interface built with Zig for performance - Include TUI (Terminal User Interface) with bubbletea-like features - Implement ML experiment commands (run, status, manage) - Add configuration management and validation - Include shell completion scripts for bash and zsh - Add comprehensive CLI testing framework - Support for multiple ML frameworks and project types CLI provides fast, efficient interface for ML experiment management with modern terminal UI and comprehensive feature set.
29 lines
983 B
Zig
29 lines
983 B
Zig
const std = @import("std");
|
|
const testing = std.testing;
|
|
const src = @import("src");
|
|
const rsync = src.utils.rsync_embedded.EmbeddedRsync;
|
|
|
|
test "embedded rsync binary creation" {
|
|
const allocator = testing.allocator;
|
|
|
|
var embedded_rsync = rsync.EmbeddedRsync{ .allocator = allocator };
|
|
|
|
// Test binary extraction
|
|
const rsync_path = try embedded_rsync.extractRsyncBinary();
|
|
defer allocator.free(rsync_path);
|
|
|
|
// Verify the binary was created
|
|
const file = try std.fs.cwd().openFile(rsync_path, .{});
|
|
defer file.close();
|
|
|
|
// Verify it's executable
|
|
const stat = try std.fs.cwd().statFile(rsync_path);
|
|
try testing.expect(stat.mode & 0o111 != 0);
|
|
|
|
// Verify it's a bash script wrapper
|
|
const content = try file.readToEndAlloc(allocator, 1024);
|
|
defer allocator.free(content);
|
|
|
|
try testing.expect(std.mem.indexOf(u8, content, "rsync") != null);
|
|
try testing.expect(std.mem.indexOf(u8, content, "#!/usr/bin/env bash") != null);
|
|
}
|