anchor.diff:   * The Original Code is TurboPower Abbrevia
    *
    * The Initial Developer of the Original Code is
  - * Robert Love
  + * Craig Peterson
    *
    * Portions created by the Initial Developer are Copyright (C) 1997-2002
    * the Initial Developer. All Rights Reserved.
  
positive.code: 
  function ArcTypeToStr(aValue: TAbArchiveType): string;
  begin
    Result := GetEnumName(TypeInfo(TAbArchiveType), Integer(aValue));
  end;
  
  { TAbBaseBrowserTests }
  
  
  class function TAbBaseBrowserTests.Suite: ITestSuite;
  const
    Files: array[TAbArchiveType] of string = (
      'MPL-1_1.txt', 'MPL.ZIP', '', 'MPL.EXE', 'MPL.TAR', 'MPL.GZ', 'MPL.TGZ',
      'MPL.CAB', 'MPL.BZ2', 'MPL.TBZ');
  var
    arcType: TAbArchiveType;
  begin
    Result := TTestSuite.Create('AbDetermineArcType tests');
    for arcType := Low(arcType) to High(arcType) do
      if Files[arcType] <> '' then
        Suite.AddTest(TAbDetermineArcTypeTest.Create(
          TestFileDir + Files[arcType], arcType));
    Suite.AddTest(TAbDetermineArcTypeTest.Create(
      CanterburyDir + 'Split' + PathDelim + 'Split.zip', atSpannedZip));
    Suite.AddTest(TAbDetermineArcTypeTest.Create(
      TestFileDir + 'Test0001.cab', atCab));
  end;
  
  { TAbDetermineArcTypeTest }
  
  constructor TAbDetermineArcTypeTest.Create(const aFilename: string;
    aExpectedType: TAbArchiveType);
  begin
    inherited Create('TestDetermineArcType');
    FTestName := Format('%s (%s)',
      [ExtractFileName(aFilename), ArcTypeToStr(aExpectedType)]);
    FFilename := aFilename;
    FExpectedType := aExpectedType;
  end;
  
  procedure TAbDetermineArcTypeTest.CheckEquals(expected, actual: TAbArchiveType;
    const msg: string);
  begin
    if expected <> actual then
      FailNotSame(ArcTypeToStr(expected), ArcTypeToStr(actual), msg);
  end;
  
  procedure TAbDetermineArcTypeTest.TestDetermineArcType;
  var
    Stream: TFileStream;
  begin
    CheckEquals(FExpectedType, AbDetermineArcType(FFilename, FExpectedType),
      'Checking filename with asserted type');
    CheckEquals(FExpectedType, AbDetermineArcType(FFilename, atUnknown),
      'Checking filename without asserted type');
    Stream := TFileStream.Create(FFilename, fmOpenRead);
    try
      CheckEquals(FExpectedType, AbDetermineArcType(Stream), 'Checking stream');
    finally
      Stream.Free;
    end;
  end;
  
  initialization
  
    TestFramework.RegisterTest('Abbrevia.Component Level Test Suite',
  
negative.code: type
    TAbBaseBrowserTests = class(TAbCompTestCase)
    public
      class function Suite: ITestSuite; override;
    end;
  
    TAbDetermineArcTypeTest = class(TAbTestCase)
  