###############################################################################
#
# redefine.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 redefine-1.1 {redefine set while script is pending} -setup {
  unset -nocomplain x
} -body {
  list [set x 1] [set x [proc set args "return {GOOD $x}"]] $x
} -cleanup {
  unset x

  #
  # NOTE: Now, remove the set procecure and restore the core 
  #       [set] command.
  #
  rename -kind procedure set ""
  debug restore
} -constraints {eagle} -result {1 {GOOD 1} 1}}

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

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