source: trunk/base/src/pextlib1.0/tests/fifo.tcl @ 13162

Last change on this file since 13162 was 13162, checked in by pguyot (Paul Guyot), 15 years ago

New command: mkfifo.
Also fixed test target in src/registry1.0/

  • Property svn:eol-style set to native
File size: 554 bytes
Line 
1# Test file for Pextlib's mkfifo.
2# Requires r/w access to /tmp/
3# Syntax:
4# tclsh mkfifo.tcl <Pextlib name>
5
6proc main {pextlibname} {
7        load $pextlibname
8       
9        set fifo_path "/tmp/darwinports-pextlib-fifo"
10       
11        file delete -force $fifo_path
12
13        # Create the named pipe.
14        mkfifo $fifo_path 0700
15       
16        # Check it exists.
17        if {![file exists $fifo_path]} {
18                puts {![file exists $fifo_path]}
19                exit 1
20        }
21
22        # Check it's a fifo.
23        if {[file type $fifo_path] != "fifo"} {
24                puts {[file type $fifo_path] != "fifo"}
25                exit 1
26        }
27
28        file delete -force $fifo_path
29}
30
31main $argv
Note: See TracBrowser for help on using the repository browser.