! Test the handling of blank Strings by switches.
!
! Author:  JC4, J Bauer
! Version: $Id: test_switch_blanks.mm,v 1.3 2010/12/08 16:05:28 jwb Exp $
! Bug: 2285 - SWITCH: Blank Strings are handled wrong, even if quoted
!
startmacro/A/B=/F=/C=""/D="MyStr"
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  !!                  NOTE
  !!   This test is meant to be run from test_switch.mm, which passes in /F
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  switch "A" "AVAL" "GET" "MyDef" "MySDef"
  assert/text="State Switch: (A='^AVAL')" aVAL eqs "MySDef"

  ! Prior to Bug 2285 fix, this assert fails
  switch "B" "BVAL" "GET" "MyDef" "MySDef"
  assert/text="Value Switch with Empty String: (B='^BVAL')" bVAL eqs ""

  ! Prior to Bug 2285 fix, this assert fails
  switch "C" "CVAL" "GET" "MyDef" "MySDef"
  assert/text="Value Switch with Empty Quoted String: (C='^CVAL')" cVAL eqs ""

  switch "D" "DVAL" "GET" "MyDef" "MySDef"
  assert/text="Value Switch with Given String: (D='^DVAL')" dVAL eqs "MyStr"

  switch "E" "EVAL" "GET" "MyDef" "MySDef"
  assert/text="Switch not given: (E='^EVAL')" eVAL eqs "MyDef"
  
  
  switch "F" "FOOVAL" GET "MyDef" "MySDef"
  assert/text="Switch 'F': (F='^FOOVAL')" FOOVAL eqs "MySDef"

endmacro
