anchor.diff:          rem   !!!   ERRORLEVEL doesn't get updated inside control blocks like IF statements unless           !!!
           rem   !!!   !ERRORLEVEL! is used instead of %ERRORLEVEL% and delayed expansion is enabled as below:  !!!
           rem   !!!   setlocal ENABLEDELAYEDEXPANSION                                                          !!!
  -        rem   ~ removes quotes from %%~X
  -        !app_path! %%~X --width %GOLDEN_IMAGE_WIDTH% --height %GOLDEN_IMAGE_HEIGHT% --golden_image_mode %golden_img_mode% --capture_path %golden_img_dir% --capture_name !capture_name! --capture_format png --adapters_dialog 0 --show_ui %show_ui%
  +        set cmd_args=!test_mode! --width %GOLDEN_IMAGE_WIDTH% --height %GOLDEN_IMAGE_HEIGHT% --golden_image_mode %golden_img_mode% --capture_path %golden_img_dir% --capture_name !capture_name! --capture_format png --adapters_dialog 0 %extra_args%
  +        echo !app_path! !cmd_args!
  +        !app_path! !cmd_args!
   
           if !ERRORLEVEL! NEQ 0 (set EXIT_CODE=1)
   
           if "%golden_img_mode%" == "compare" (
  -            if !ERRORLEVEL! EQU 0 (set STATUS=%FONT_GREEN%Golden image validation PASSED for %app_name% [!backend_name!!extra_args!].%FONT_DEFAULT%)
  -            if !ERRORLEVEL! GTR 0 (set STATUS=%FONT_RED%Golden image validation FAILED for %app_name% [!backend_name!!extra_args!]: !ERRORLEVEL! inconsistent pixels found.%FONT_DEFAULT%)
  -            if !ERRORLEVEL! LSS 0 (set STATUS=%FONT_RED%Golden image validation FAILED for %app_name% [!backend_name!!extra_args!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
  +            if !ERRORLEVEL! EQU 0 (set STATUS=%FONT_GREEN%Golden image validation PASSED for %app_name% [!test_mode!].%FONT_DEFAULT%)
  +            if !ERRORLEVEL! GTR 0 (set STATUS=%FONT_RED%Golden image validation FAILED for %app_name% [!test_mode!]: !ERRORLEVEL! inconsistent pixels found.%FONT_DEFAULT%)
  +            if !ERRORLEVEL! LSS 0 (set STATUS=%FONT_RED%Golden image validation FAILED for %app_name% [!test_mode!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
           )
           if "%golden_img_mode%" == "capture" (
  -            if !ERRORLEVEL! EQU 0 (set STATUS=%FONT_GREEN%Successfully generated golden image for %app_name% [!backend_name!!extra_args!].%FONT_DEFAULT%)
  -            if !ERRORLEVEL! GTR 0 (set STATUS=%FONT_RED%FAILED to generate golden image for %app_name% [!backend_name!!extra_args!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
  -            if !ERRORLEVEL! LSS 0 (set STATUS=%FONT_RED%FAILED to generate golden image for %app_name% [!backend_name!!extra_args!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
  +            if !ERRORLEVEL! EQU 0 (set STATUS=%FONT_GREEN%Successfully generated golden image for %app_name% [!test_mode!].%FONT_DEFAULT%)
  +            if !ERRORLEVEL! GTR 0 (set STATUS=%FONT_RED%FAILED to generate golden image for %app_name% [!test_mode!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
  +            if !ERRORLEVEL! LSS 0 (set STATUS=%FONT_RED%FAILED to generate golden image for %app_name% [!test_mode!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
           )
           if "%golden_img_mode%" == "compare_update" (
  -            if !ERRORLEVEL! EQU 0 (set STATUS=%FONT_GREEN%Golden image validation PASSED for %app_name%. Image updated. [!backend_name!!extra_args!].%FONT_DEFAULT%)
  -            if !ERRORLEVEL! GTR 0 (set STATUS=%FONT_RED%Golden image validation FAILED for %app_name% [!backend_name!!extra_args!]: !ERRORLEVEL! inconsistent pixels found. Image updated.%FONT_DEFAULT%)
  -            if !ERRORLEVEL! LSS 0 (set STATUS=%FONT_RED% FAILED to validate or update golden image for %app_name% [!backend_name!!extra_args!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
  +            if !ERRORLEVEL! EQU 0 (set STATUS=%FONT_GREEN%Golden image validation PASSED for %app_name%. Image updated. [!test_mode!].%FONT_DEFAULT%)
  +            if !ERRORLEVEL! GTR 0 (set STATUS=%FONT_RED%Golden image validation FAILED for %app_name% [!test_mode!]: !ERRORLEVEL! inconsistent pixels found. Image updated.%FONT_DEFAULT%)
  +            if !ERRORLEVEL! LSS 0 (set STATUS=%FONT_RED% FAILED to validate or update golden image for %app_name% [!test_mode!]. Error code: !ERRORLEVEL!.%FONT_DEFAULT%)
           )
   
           :: For some reason, colored font does not work after the line that starts the sample app
  
positive.code: 
  
  :gen_golden_img
  
      set app_folder=%1
      shift
  
      set app_name=%1
      shift
  
      rem  Who knows why, but without the echos below, the script fails on Appveyor.
      @echo Testing %app_folder%/%app_name%...
      @echo.
  
      set show_ui=1
      if "%app_folder%" == "Samples" (
          set show_ui=0
          if "%app_name%" == "ImguiDemo" set show_ui=1
      )
  	if "%app_name%" == "Tutorial18_Queries" set show_ui=0
      if "%app_name%" == "Tutorial23_CommandQueues" set show_ui=0
  	
      set test_modes=
      :loop2
  	    :: Do not remove quotes as this will ungroup arguments
          if "%~1"=="" goto end_loop2
          set test_modes=%test_modes% %1
          shift
          goto loop2
      :end_loop2
  
      cd "%app_folder%/%app_name%/assets"
  
  
negative.code:     )
  )
  
  cd Tests
  
  for %%X in (%OVERAL_STATUS%) do (
  