failing test with golang 1.16

Bug #1930776 reported by Dan Bungert
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
golang-github-nicksnyder-go-i18n.v2 (Debian)
Fix Released
Unknown
golang-github-nicksnyder-go-i18n.v2 (Ubuntu)
Fix Released
Low
William Wilson

Bug Description

Running tests with golang 1.16 results in the following test failure:

=== RUN TestExecute/hello_{{
    template_test.go:57: expected err "template: :1: unexpected unclosed action in command"; got "template: :1: unclosed action"
--- FAIL: TestExecute (0.00s)

I have reported this upstream.
https://github.com/nicksnyder/go-i18n/issues/259

A fix is reasonably straightforward - one could just check that error is non-nil for example, instead of worrying about the exact error text. Or one could check that "unclosed action" is part of the error substring.

Revision history for this message
William Wilson (jawn-smith) wrote :

This patch resolves the broken tests by checking if the string "unclosed action" is present in the error message rather than looking for the whole message. This allows it to work on all versions of go.

It has been forwarded upstream: https://github.com/nicksnyder/go-i18n/pull/260

It has been forwarded to Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990236

Changed in golang-github-nicksnyder-go-i18n.v2 (Ubuntu):
assignee: nobody → William Wilson (jawn-smith)
status: New → Fix Committed
Changed in golang-github-nicksnyder-go-i18n.v2 (Debian):
status: Unknown → New
Revision history for this message
William Wilson (jawn-smith) wrote :

The upstream PR has been merged.

Mathew Hodson (mhodson)
Changed in golang-github-nicksnyder-go-i18n.v2 (Ubuntu):
importance: Undecided → Low
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

sponsored

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang-github-nicksnyder-go-i18n.v2 - 2.1.1-2ubuntu1

---------------
golang-github-nicksnyder-go-i18n.v2 (2.1.1-2ubuntu1) impish; urgency=medium

  * Update test case to work with golang-1.16 and golang-1.15 (LP: #1930776)

 -- William 'jawn-smith' Wilson <email address hidden> Wed, 23 Jun 2021 14:50:37 +0000

Changed in golang-github-nicksnyder-go-i18n.v2 (Ubuntu):
status: Fix Committed → Fix Released
Changed in golang-github-nicksnyder-go-i18n.v2 (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.