| 1 |
with Gnat.Strings; use Gnat.Strings; |
| 2 |
with Gnatcoll.Projects; use Gnatcoll.Projects; |
| 3 |
with Gnatcoll.VFS; use Gnatcoll.VFS; |
| 4 |
|
| 5 |
with Test_Assert; |
| 6 |
|
| 7 |
function Test return Integer is |
| 8 |
Tree : Gnatcoll.Projects.Project_Tree; |
| 9 |
begin |
| 10 |
Load (Tree, Root_Project_Path => Create (+"test1.gpr")); |
| 11 |
|
| 12 |
declare |
| 13 |
File_Name : constant String := |
| 14 |
+File_From_Unit (Project => Root_Project (Tree), |
| 15 |
Unit_Name => "PrOc", |
| 16 |
Part => Unit_Body, |
| 17 |
Language => "ada", |
| 18 |
File_Must_Exist => False); |
| 19 |
begin |
| 20 |
Test_Assert.Assert |
| 21 |
(File_Name, "my__proc.txt", "Wrong file name for unit Proc"); |
| 22 |
end; |
| 23 |
|
| 24 |
return Test_Assert.Report; |
| 25 |
|
| 26 |
end Test; |
| 27 |
|