rename turbo to turbonss
This commit is contained in:
@@ -16,7 +16,7 @@ test "turbonss test suite" {
|
||||
_ = @import("validate.zig");
|
||||
|
||||
// main
|
||||
_ = @import("turbo-getent.zig");
|
||||
_ = @import("turbo-unix2db.zig");
|
||||
_ = @import("turbo-analyze.zig");
|
||||
_ = @import("turbonss-getent.zig");
|
||||
_ = @import("turbonss-unix2db.zig");
|
||||
_ = @import("turbonss-analyze.zig");
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const Header = @import("header.zig").Header;
|
||||
const section_length_bits = @import("header.zig").section_length_bits;
|
||||
|
||||
const usage =
|
||||
\\usage: turbo-analyze [OPTION]... <PATH>
|
||||
\\usage: turbonss-analyze [OPTION]... <PATH>
|
||||
\\
|
||||
\\Arguments:
|
||||
\\ <PATH> Path to the database (default: /etc/turbonss/db.turbo)
|
||||
@@ -159,7 +159,7 @@ fn execute(
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
test "turbo-analyze trivial error: db file" {
|
||||
test "turbonss-analyze trivial error: db file" {
|
||||
const args = &[_][*:0]const u8{"/does/not/exist.turbo"};
|
||||
const allocator = testing.allocator;
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
@@ -190,7 +190,7 @@ fn splitInt(n: u64) BoundedArray(u8, max_len) {
|
||||
return result;
|
||||
}
|
||||
|
||||
test "turbo-analyze separators" {
|
||||
test "turbonss-analyze separators" {
|
||||
const tests = [_]struct {
|
||||
input: u64,
|
||||
want: []const u8,
|
||||
@@ -16,12 +16,12 @@ const User = @import("User.zig");
|
||||
const Mode = enum { group, passwd };
|
||||
|
||||
const usage =
|
||||
\\usage: turbo-getent [OPTION]... group|passwd [key...]
|
||||
\\usage: turbonss-getent [OPTION]... group|passwd [key...]
|
||||
\\
|
||||
\\ -h Print this help message and exit
|
||||
\\ --db=PATH Path to the database (default: /etc/turbonss/db.turbo)
|
||||
\\ --db PATH Path to the database (default: /etc/turbonss/db.turbo)
|
||||
\\
|
||||
\\turbo-getent resolves group or passwd (a.k.a. user) entries from the
|
||||
\\turbonss-getent resolves group or passwd (a.k.a. user) entries from the
|
||||
\\database file. If one or more key arguments are provided, then only
|
||||
\\entries that match the supplied keys will be displayed. If no key is
|
||||
\\provided, all entries will be displayed.
|
||||
@@ -194,7 +194,7 @@ fn printGroup(stdout: anytype, db: *const DB, g: *const PackedGroup) ?u8 {
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
test "turbo-getent passwd" {
|
||||
test "turbonss-getent passwd" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@@ -224,7 +224,7 @@ test "turbo-getent passwd" {
|
||||
}
|
||||
}
|
||||
|
||||
test "turbo-getent passwdAll" {
|
||||
test "turbonss-getent passwdAll" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@@ -259,7 +259,7 @@ test "turbo-getent passwdAll" {
|
||||
}
|
||||
}
|
||||
|
||||
test "turbo-getent group" {
|
||||
test "turbonss-getent group" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@@ -290,7 +290,7 @@ test "turbo-getent group" {
|
||||
}
|
||||
}
|
||||
|
||||
test "turbo-getent groupAll" {
|
||||
test "turbonss-getent groupAll" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@@ -15,7 +15,7 @@ const DB = @import("DB.zig");
|
||||
const ErrCtx = @import("ErrCtx.zig");
|
||||
|
||||
const usage =
|
||||
\\usage: turbo-unix2db [options]
|
||||
\\usage: turbonss-unix2db [options]
|
||||
\\
|
||||
\\ -h Print this help message and exit
|
||||
\\ --passwd Path to passwd file (default: passwd)
|
||||
@@ -129,7 +129,7 @@ fn fail(errc: *ErrCtx, stderr: anytype, err: anytype) u8 {
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
test "turbo-unix2db invalid argument" {
|
||||
test "turbonss-unix2db invalid argument" {
|
||||
const allocator = testing.allocator;
|
||||
const args = &[_][*:0]const u8{"--invalid-argument"};
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
@@ -146,7 +146,7 @@ test "turbo-unix2db invalid argument" {
|
||||
));
|
||||
}
|
||||
|
||||
test "turbo-unix2db trivial error: missing passwd file" {
|
||||
test "turbonss-unix2db trivial error: missing passwd file" {
|
||||
const allocator = testing.allocator;
|
||||
const args = &[_][*:0]const u8{};
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
@@ -159,7 +159,7 @@ test "turbo-unix2db trivial error: missing passwd file" {
|
||||
try testing.expectEqualStrings(stderr.items, "ERROR FileNotFound: open 'passwd'\n");
|
||||
}
|
||||
|
||||
test "turbo-unix2db fail" {
|
||||
test "turbonss-unix2db fail" {
|
||||
var errc = ErrCtx{};
|
||||
var buf = ArrayList(u8).init(testing.allocator);
|
||||
defer buf.deinit();
|
||||
@@ -169,7 +169,7 @@ test "turbo-unix2db fail" {
|
||||
try testing.expectEqualStrings(buf.items, "ERROR NotSure: invalid user 'foo'\n");
|
||||
}
|
||||
|
||||
test "turbo-unix2db smoke test" {
|
||||
test "turbonss-unix2db smoke test" {
|
||||
const allocator = testing.allocator;
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
defer stderr.deinit();
|
||||
Reference in New Issue
Block a user