Skip to content

Commit

Permalink
Basic mkfifo implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mengzhuo committed Sep 24, 2024
1 parent 46a6e26 commit aed3d73
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/mkfifo/mkfifo.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fn run_mkfifo(args []string) {
mut opts := Options{
mode: u32(fp.int('mode', `m`, int(default_mode), 'set file permission bits to MODE, not a=rw - umask'))
}
println('${opts.mode:o}')

help := fp.bool('help', 0, false, 'display this help and exit')
version := fp.bool('version', 0, false, 'output version information and exit')
Expand Down
4 changes: 4 additions & 0 deletions src/mkfifo/mkfifo_default.c.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// mkfifo on unsupported platforms
fn mkfifo(pathname string, mode int) int {
return -1
}
File renamed without changes.
10 changes: 3 additions & 7 deletions src/mkfifo/mkfifo_test.v → src/mkfifo/mkfifo_nix_test.v
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import os
import common.testing

const util = 'mkfifo'
const platform_util = $if !windows {
util
}

const rig = testing.prepare_rig(util: util)
const eol = testing.output_eol()

const tfolder = os.join_path(os.temp_dir(), 'coreutils', 'mkfifo_test')

const util = 'mkfifo'
const platform_util = util

const executable_under_test = testing.prepare_executable(util)
const cmd = testing.new_paired_command(platform_util, executable_under_test)

Expand Down

0 comments on commit aed3d73

Please sign in to comment.