all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#48230] [PATCH] tests: go: Rename and fix duplicate test.
@ 2021-05-04 20:55 Tobias Geerinckx-Rice via Guix-patches via
  2021-05-05  5:03 ` bug#48230: " Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-05-04 20:55 UTC (permalink / raw)
  To: 48230; +Cc: francois.joulaud, maxim.cournoyer

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1156 bytes --]

* tests/go.scm: Rename "go-version omited 'v' character" to
"go-version without 'v' prefix" and change the code to match.
---

Hi all,

Found on a typo hunt.

This is my best-effort guess at what was intended.  Maybe I'm mistaken: is GO-VERSION->GIT-REF supposed to normalise "1.0.2" to "v1.0.2" instead?  Let me know!

Kind regards,

T G-R

 tests/go.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/go.scm b/tests/go.scm
index c33a834f69..565a0d451d 100644
--- a/tests/go.scm
+++ b/tests/go.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 François Joulaud <francois.joulaud@radiofrance.com>
+;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -158,9 +159,9 @@ require github.com/kr/pretty v0.2.1
   "v1.0.2"
   (go-version->git-ref "v1.0.2"))
 
-(test-equal "go-version omited 'v' character"
-  "v1.0.2"
-  (go-version->git-ref "v1.0.2"))
+(test-equal "go-version without 'v' prefix"
+  "1.0.2"
+  (go-version->git-ref "1.0.2"))
 
 (test-equal "go-version with embedded git-ref"
   "65e3620a7ae7"
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#48230: [PATCH] tests: go: Rename and fix duplicate test.
  2021-05-04 20:55 [bug#48230] [PATCH] tests: go: Rename and fix duplicate test Tobias Geerinckx-Rice via Guix-patches via
@ 2021-05-05  5:03 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2021-05-05  5:03 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: francois.joulaud, 48230-done

Hi Tobias!

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> * tests/go.scm: Rename "go-version omited 'v' character" to
> "go-version without 'v' prefix" and change the code to match.
> ---
>
> Hi all,
>
> Found on a typo hunt.

Eh, thank you!

> This is my best-effort guess at what was intended.  Maybe I'm
> mistaken: is GO-VERSION->GIT-REF supposed to normalise "1.0.2" to
> "v1.0.2" instead?  Let me know!

I wasn't sure anymore, so I looked at the code; go-version->git-ref is a
no-op (leaves the version string intact) unless it matches
%go-pseudo-version-rx.

>  tests/go.scm | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/go.scm b/tests/go.scm
> index c33a834f69..565a0d451d 100644
> --- a/tests/go.scm
> +++ b/tests/go.scm
> @@ -1,5 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright  2021 Franois Joulaud <francois.joulaud@radiofrance.com>
> +;;; Copyright  2021 Tobias Geerinckx-Rice <me@tobias.gr>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -158,9 +159,9 @@ require github.com/kr/pretty v0.2.1
>    "v1.0.2"
>    (go-version->git-ref "v1.0.2"))
>  
> -(test-equal "go-version omited 'v' character"
> -  "v1.0.2"
> -  (go-version->git-ref "v1.0.2"))
> +(test-equal "go-version without 'v' prefix"
> +  "1.0.2"
> +  (go-version->git-ref "1.0.2"))

That test doesn't have much value based on my above analysis.  I suggest
we drop it; it's testing the same thing as the "v1.0.2" case.

I've removed it and pushed with commit 2354d79b88.

Thank you!

Maxim




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-05  5:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-04 20:55 [bug#48230] [PATCH] tests: go: Rename and fix duplicate test Tobias Geerinckx-Rice via Guix-patches via
2021-05-05  5:03 ` bug#48230: " Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.