Skip to content

Commit

Permalink
Self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Jun 17, 2024
1 parent 67d7a8e commit 5502ada
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
14 changes: 4 additions & 10 deletions src/alire/alire-directories.adb
Original file line number Diff line number Diff line change
Expand Up @@ -641,16 +641,10 @@ package body Alire.Directories is
function Temp_Name (Length : Positive := 8) return String is
Result : String (1 .. Length + 4);
begin

Char_Random.Reset (Gen, To_Integer (Seed));

return Result : String (1 .. Length + 4) do
Result (1 .. 4) := "alr-";
Result (Length + 1 .. Result'Last) := ".tmp";
for I in 5 .. Length loop
Result (I) := Char_Random.Random (Gen);
end loop;
end return;
Result (1 .. 4) := "alr-";
Result (Length + 1 .. Result'Last) := ".tmp";
Tempfile_Support.Next_Name (Result (5 .. Length));
return Result;
end Temp_Name;

----------------
Expand Down
4 changes: 2 additions & 2 deletions testsuite/tests/printenv/out-of-root/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# Verify root crate proper path in GPR_PROJECT_PATH
assert_match(r".*GPR_PROJECT_PATH[^\n]+"
+ re.escape(os.path.join(parent, "base"))
+ "(:|\")", p.out)
+ "(:|;|\")", p.out)

# Verify pinned crate proper path in GPR_PROJECT_PATH
assert_match(r".*GPR_PROJECT_PATH[^\n]+"
+ re.escape(os.path.join(parent, "base", "pinned"))
+ "(:|\")", p.out)
+ "(:|;|\")", p.out)

print("SUCCESS")

0 comments on commit 5502ada

Please sign in to comment.