-----------------------------------------------------------------
--         Copyright (C) 2007-2017, AdaCore                    --
-----------------------------------------------------------------

with GNATCOLL.Mmap;           use GNATCOLL.Mmap;
with GNAT.Strings;            use GNAT.Strings;

procedure Main is
   Str    : String_Access;
begin

   Str := Read_Whole_File ("data.txt");
   if Str = null then
      raise Program_Error with "Received null";
   elsif Str.all /= "some data" then
      raise Program_Error with "Invalid content: " & Str.all & "--";
   end if;
end Main;
