<commit_before># Test file for Pextlib's mkfifo.
# Requires r/w access to /tmp/
# Syntax:
# tclsh mkfifo.tcl <Pextlib name>

proc main {pextlibname} {
	load $pextlibname
	
	set fifo_path "/tmp/darwinports-pextlib-fifo"
	
	file delete -force $fifo_path

	# Create the named pipe.
	mkfifo $fifo_path 0700
	
	# Check it exists.
	if {![file exists $fifo_path]} {
		puts {![file exists $fifo_path]}
		exit 1
	}

	# Check it's a fifo.
	if {[file type $fifo_path] != "fifo"} {
		puts {[file type $fifo_path] != "fifo"}
		exit 1
	}

	file delete -force $fifo_path
}

main $argv<commit_msg>Improved the test for fifo.<commit_after># Test file for Pextlib's mkfifo.
# Requires r/w access to /tmp/
# Syntax:
# tclsh mkfifo.tcl <Pextlib name>

proc main {pextlibname} {
	load $pextlibname
	
	set fifo_path "/tmp/darwinports-pextlib-fifo"
	
	file delete -force $fifo_path

	# Create the named pipe.
	mkfifo $fifo_path 0700
	
	# Check it exists.
	if {![file exists $fifo_path]} {
		puts {![file exists $fifo_path]}
		exit 1
	}

	# Check it's a fifo.
	if {[file type $fifo_path] != "fifo"} {
		puts {[file type $fifo_path] != "fifo"}
		exit 1
	}

	file delete -force $fifo_path
	
	set fifo_path "/tmp/darwinports-pextlib-fifo-dummydir/foo"

	# Test that mkfifo returns an error if the directory doesn't exist.
	if {![catch {mkfifo $fifo_path}]} {
		puts {![catch {mkfifo $fifo_path}]}
		exit 1
	}
}

main $argv
{'fraction_non_alphanumeric': 0.12759856630824373, 'fraction_numerical': 0.00931899641577061, 'mean_word_length': 3.547231270358306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1337296', 'n_tokens_mistral': 622, 'n_tokens_neox': 573, 'n_words': 167}