This cherry-picked patch fixes tests for Go >= 1.15. Restic v0.10 (which includes this patch) requires go module support from the Go build system. Original patch follows. --- From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 12 Sep 2020 17:36:44 +0200 Subject: [PATCH] options: Fix test for Go >= 1.15 --- internal/options/options_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/options/options_test.go b/internal/options/options_test.go index de94fc90a1..8d268992a3 100644 --- a/internal/options/options_test.go +++ b/internal/options/options_test.go @@ -3,6 +3,7 @@ package options import ( "fmt" "reflect" + "regexp" "testing" "time" ) @@ -199,7 +200,7 @@ var invalidSetTests = []struct { "timeout": "2134", }, "ns", - `time: missing unit in duration 2134`, + `time: missing unit in duration "?2134"?`, }, } @@ -212,8 +213,13 @@ func TestOptionsApplyInvalid(t *testing.T) { t.Fatalf("expected error %v not found", test.err) } - if err.Error() != test.err { - t.Fatalf("expected error %q, got %q", test.err, err.Error()) + matched, err := regexp.MatchString(test.err, err.Error()) + if err != nil { + t.Fatal(err) + } + + if !matched { + t.Fatalf("expected error to match %q, got %q", test.err, err.Error()) } }) } h?id=5cdd45f0f155787b13eccc63c60f71ee123ff58b'>diff
path: root/tests/guix-repl.sh
AgeCommit message (Expand)Author
2020-09-16repl: Look for script files in (getcwd)....Fixes <https://bugs.gnu.org/43331>. * guix/scripts/repl.scm (guix-repl): Replace "." by (getcwd) * tests/guix-repl.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Konrad Hinsen
2020-06-14guix repl: Add script execution....* guix/scripts/repl.scm: Add filename options for script execution. * doc/guix.texi (Invoking guix repl): Document it. * tests/guix-repl.sh: Test it. * Makefile.am: (SH_TESTS): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Konrad Hinsen