anchor.diff:  open System.IO
   open NUnit.Framework
   open FsUnit
  -
   
   /// Helper functions and values for implementing file-based test cases.
   [<AutoOpen>]
  
positive.code:                 testCases () :> System.Collections.IEnumerable
  
      //
      [<TestCaseSource(typeof<RepositoryTestCases>, "Items")>]
      let repository (inputFilename : string, outputFilename : string, internalModule : bool, parserModuleName : string) =
          //
          use toolProcess = new Process ()
          
  
negative.code:         else
              // Read the error/output streams from the process, then write them into the
              // error/output streams of this process so they can be captured by NUnit.
              
              let details = System.Text.StringBuilder()
              do
                  let errorStr = toolProcess.StandardError.ReadToEnd ()
                  if not <| String.IsNullOrWhiteSpace errorStr then
                      System.Console.Error.Write errorStr
                      Printf.bprintf details "Errors: %s" errorStr
  
              do
                  let outputStr = toolProcess.StandardOutput.ReadToEnd ()
                  if not <| String.IsNullOrWhiteSpace outputStr then
                      System.Console.Out.Write outputStr
                      Printf.bprintf details "Console output: %s" outputStr
  
              // Based on the process' exit code, assert that the test passed or failed.
              if toolProcess.ExitCode = 0 then
                  Assert.Pass (sprintf "The execution took %A for file %s" sw.Elapsed inputFilename)
              else
                  let msg = sprintf "The external tool process exited with code %i.\n%s" toolProcess.ExitCode (details.ToString())
                  Assert.Fail msg
  