###############################################################################
#
# open.eagle --
#
# Extensible Adaptable Generalized Logic Engine (Eagle)
#
# Copyright (c) 2007-2012 by Joe Mistachkin.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: $
#
###############################################################################

source [file join [file normalize [file dirname [info script]]] prologue.eagle]

###############################################################################

runTest {test open-1.1 {open with buffer size and options} -setup {
  set file [file join [getTemporaryPath] open-1-1.txt]
} -body {
  list [catch {
    set fd [open $file {WRONLY CREAT TRUNC} 0 \
        "file" -buffersize 1048576 -share none -options WriteThrough]
    puts $fd "this is a test."; flush $fd
    close $fd
  } error] $error
} -cleanup {
  catch {close $fd}
  catch {file delete $file}
  unset -nocomplain fd file error
} -constraints {eagle} -result {0 {}}}

###############################################################################

source [file join [file normalize [file dirname [info script]]] epilogue.eagle]
