diff options
author | Michael Muré <batolettre@gmail.com> | 2021-03-29 10:58:10 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-03-29 11:02:08 +0200 |
commit | aa0449a3eafa42c8c0d44bbdc2b79c5f47bd2d32 (patch) | |
tree | cd0c72a0229bb38cf8096ce198384cdd972f66e2 /cache/repo_cache_test.go | |
parent | 5215634d0dca37c545904fbc8a12ddd9b8eb72df (diff) | |
parent | e985653701e8438e27ee5f925fd0aa7c0eef09fe (diff) | |
download | git-bug-aa0449a3eafa42c8c0d44bbdc2b79c5f47bd2d32.tar.gz |
Merge remote-tracking branch 'origin/master' into dag-entity
Diffstat (limited to 'cache/repo_cache_test.go')
-rw-r--r-- | cache/repo_cache_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cache/repo_cache_test.go b/cache/repo_cache_test.go index 35dc4ffd..fab8fff0 100644 --- a/cache/repo_cache_test.go +++ b/cache/repo_cache_test.go @@ -1,7 +1,9 @@ package cache import ( + "strings" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -278,3 +280,21 @@ func checkBugPresence(t *testing.T, cache *RepoCache, bug *BugCache, presence bo require.Equal(t, bug, b) } } + +func TestLongDescription(t *testing.T) { + // See https://github.com/MichaelMure/git-bug/issues/606 + + text := strings.Repeat("x", 65536) + + repo := repository.CreateGoGitTestRepo(false) + defer repository.CleanupTestRepos(repo) + + backend, err := NewRepoCache(repo) + require.NoError(t, err) + + i, err := backend.NewIdentity("René Descartes", "rene@descartes.fr") + require.NoError(t, err) + + _, _, err = backend.NewBugRaw(i, time.Now().Unix(), text, text, nil, nil) + require.NoError(t, err) +} |