Skip to content

Commit

Permalink
Fix non-ASCII char used when --no-color in effect (alire-project#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo authored Mar 25, 2024
1 parent 5dcc28e commit a016de2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions src/alire/alire-solutions-diffs.adb
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ package body Alire.Solutions.Diffs is
when Missing => TTY.Error (U ("")), -- alts: ⚠️❗‼️
when Binary => TTY.Warn (U ("📦")),
when Info => TTY.Emph (U ("🛈")))
else
else "" &
(case Change is
when Added => U ("+"),
when Removed => U ("-"),
when Upgraded => U ("^"),
when Downgraded => U ("v"),
when Pinned => U ("·"),
when Unpinned => U ("o"),
when Unchanged => U ("="),
when Missing => U ("!"),
when Binary => U ("b"),
when Info => U ("i")
when Added => '+',
when Removed => '-',
when Upgraded => '^',
when Downgraded => 'v',
when Pinned => '.',
when Unpinned => 'o',
when Unchanged => '=',
when Missing => '!',
when Binary => 'b',
when Info => 'i'
));

-- This type is used to summarize every detected change
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/pin/change-path/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_dep(nest):
assert_eq("""Note: Synchronizing workspace...
Dependencies automatically updated as follows:
· yyy 0.1.0-dev (path=../nest2/yyy)
. yyy 0.1.0-dev (path=../nest2/yyy)
yyy file:../nest2/yyy\n""",
p.out)
Expand Down
4 changes: 2 additions & 2 deletions testsuite/tests/with/changes-info/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
Changes to dependency solution:
+· local_crate unknown (new,path=local_crate)""") + ".*",
+. local_crate unknown (new,path=local_crate)""") + ".*",
p.out, flags=re.S)

###############################################################################
Expand All @@ -70,7 +70,7 @@
assert_match(".*" +
re.escape("""Changes to dependency solution:
· libhello 2.0.0 (pin=2.0.0)""") + ".*",
. libhello 2.0.0 (pin=2.0.0)""") + ".*",
p.out, flags=re.S)

###############################################################################
Expand Down

0 comments on commit a016de2

Please sign in to comment.