###############################################################################
#
# big-dir.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 bigDirectory-1.1 {exec dir on large dir (no quoting)} -setup {
  unset -nocomplain x
} -body {
  set x [testExec $env(ComSpec) [list -success Success] /c dir /ad /s /b \
      [appendArgs \" [file nativename [file normalize $env(SystemRoot)]] \"]]

  expr {[llength $x] > 0}
} -cleanup {
  catch {info previouspid true}

  unset -nocomplain x
} -constraints {eagle windows testExec comSpec_cmd.exe} -result {True}}

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

runTest {test bigDirectory-1.2 {exec dir on large dir (shell quoting)} -setup {
  unset -nocomplain x
} -body {
  set x [testExec $env(ComSpec) [list -commandline -success Success] /c dir \
      /ad /s /b [file nativename [file normalize $env(CommonProgramFiles)]]]

  expr {[llength $x] > 0}
} -cleanup {
  catch {info previouspid true}

  unset -nocomplain x
} -constraints {eagle windows testExec comSpec_cmd.exe} -result {True}}

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

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