[PR #90] [MERGED] Start to add tests for modules/base/tool #15141

Closed
opened 2025-11-02 11:39:48 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/90
Author: @metalmatze
Created: 11/6/2016
Status: Merged
Merged: 11/8/2016
Merged by: @bkcsoft

Base: masterHead: feature/tool-tests


📝 Commits (10+)

  • 11c9160 Start to add tests for modules/base/tool
  • d874a9b Add unit test for base.FileSize()
  • 70fb1cf Use testify/assert for all tests in tool_test.go
  • a5d0b4d Vendor github.com/stretchr/testify for the assert package
  • f81711f Test AvatarLink and refactor with tests passing
  • 030ba28 Add tests for EllipsisString() and fix bug if param length < 3
  • 86c32f2 Use TruncateString(sha1,10) in ShortSha and deprecate it.
  • b00d82d Add tests for TruncateString()
  • d417aed Add tests for StringsToInt64s() & Int64sToStrings()
  • 4235fff Add test for Int64sToMap()

📊 Changes

22 files changed (+4738 additions, -25 deletions)

View changed files

📝 modules/base/tool.go (+20 -25)
modules/base/tool_test.go (+185 -0)
vendor/github.com/davecgh/go-spew/LICENSE (+15 -0)
vendor/github.com/davecgh/go-spew/spew/bypass.go (+152 -0)
vendor/github.com/davecgh/go-spew/spew/bypasssafe.go (+38 -0)
vendor/github.com/davecgh/go-spew/spew/common.go (+341 -0)
vendor/github.com/davecgh/go-spew/spew/config.go (+297 -0)
vendor/github.com/davecgh/go-spew/spew/doc.go (+202 -0)
vendor/github.com/davecgh/go-spew/spew/dump.go (+509 -0)
vendor/github.com/davecgh/go-spew/spew/format.go (+419 -0)
vendor/github.com/davecgh/go-spew/spew/spew.go (+148 -0)
vendor/github.com/pmezard/go-difflib/LICENSE (+27 -0)
vendor/github.com/pmezard/go-difflib/difflib/difflib.go (+758 -0)
vendor/github.com/stretchr/testify/LICENSE (+22 -0)
vendor/github.com/stretchr/testify/assert/assertion_forward.go (+346 -0)
vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl (+4 -0)
vendor/github.com/stretchr/testify/assert/assertions.go (+1060 -0)
vendor/github.com/stretchr/testify/assert/doc.go (+45 -0)
vendor/github.com/stretchr/testify/assert/errors.go (+10 -0)
vendor/github.com/stretchr/testify/assert/forward_assertions.go (+16 -0)

...and 2 more files

📄 Description

I started to write some tests for modules/base/tool.
I'm going to add more tomorrow.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/90 **Author:** [@metalmatze](https://github.com/metalmatze) **Created:** 11/6/2016 **Status:** ✅ Merged **Merged:** 11/8/2016 **Merged by:** [@bkcsoft](https://github.com/bkcsoft) **Base:** `master` ← **Head:** `feature/tool-tests` --- ### 📝 Commits (10+) - [`11c9160`](https://github.com/go-gitea/gitea/commit/11c9160cd32934bc94e3c8bbfaeded577b1ebccb) Start to add tests for modules/base/tool - [`d874a9b`](https://github.com/go-gitea/gitea/commit/d874a9bf6b57f3d211ab1e0a07a47b7cad18a62f) Add unit test for base.FileSize() - [`70fb1cf`](https://github.com/go-gitea/gitea/commit/70fb1cf9d1c72f314be2b77354afcc65aa68aea8) Use testify/assert for all tests in tool_test.go - [`a5d0b4d`](https://github.com/go-gitea/gitea/commit/a5d0b4de5b5096793d980232c58774647213ffbe) Vendor github.com/stretchr/testify for the assert package - [`f81711f`](https://github.com/go-gitea/gitea/commit/f81711f40d46208917742b871c41fe74a4b214c1) Test AvatarLink and refactor with tests passing - [`030ba28`](https://github.com/go-gitea/gitea/commit/030ba2894f3e9f9442b4bbf83fec09bda1ca88c5) Add tests for EllipsisString() and fix bug if param length < 3 - [`86c32f2`](https://github.com/go-gitea/gitea/commit/86c32f2706d9865194d06b8eec53727785d70567) Use TruncateString(sha1,10) in ShortSha and deprecate it. - [`b00d82d`](https://github.com/go-gitea/gitea/commit/b00d82d67902b03298aedf6828b0c738398153a7) Add tests for TruncateString() - [`d417aed`](https://github.com/go-gitea/gitea/commit/d417aedcfac506674a5690c360e746ad17b366a6) Add tests for StringsToInt64s() & Int64sToStrings() - [`4235fff`](https://github.com/go-gitea/gitea/commit/4235fff9eee14e91d0587b03fac64980047660bf) Add test for Int64sToMap() ### 📊 Changes **22 files changed** (+4738 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `modules/base/tool.go` (+20 -25) ➕ `modules/base/tool_test.go` (+185 -0) ➕ `vendor/github.com/davecgh/go-spew/LICENSE` (+15 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/bypass.go` (+152 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/bypasssafe.go` (+38 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/common.go` (+341 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/config.go` (+297 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/doc.go` (+202 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/dump.go` (+509 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/format.go` (+419 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/spew.go` (+148 -0) ➕ `vendor/github.com/pmezard/go-difflib/LICENSE` (+27 -0) ➕ `vendor/github.com/pmezard/go-difflib/difflib/difflib.go` (+758 -0) ➕ `vendor/github.com/stretchr/testify/LICENSE` (+22 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertion_forward.go` (+346 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl` (+4 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertions.go` (+1060 -0) ➕ `vendor/github.com/stretchr/testify/assert/doc.go` (+45 -0) ➕ `vendor/github.com/stretchr/testify/assert/errors.go` (+10 -0) ➕ `vendor/github.com/stretchr/testify/assert/forward_assertions.go` (+16 -0) _...and 2 more files_ </details> ### 📄 Description I started to write some tests for modules/base/tool. I'm going to add more tomorrow. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:39:48 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15141