Skip to content

Commit

Permalink
Merge pull request #234 from ElrondNetwork/bug/windows-filename-trimming
Browse files Browse the repository at this point in the history
core: fix filename trimming
  • Loading branch information
AdoAdoAdo committed Jun 25, 2019
2 parents a75f1c0 + 9b8ea35 commit d07c1c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/trimmers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
// GetTrimmedPk returns a trimmed string to the pkPrefixSize value
func GetTrimmedPk(pk string) string {
if len(pk) > pkPrefixSize {
pk = pk[:pkPrefixSize] + "..."
pk = pk[:pkPrefixSize]
}

return pk
Expand Down
2 changes: 1 addition & 1 deletion core/trimmers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func TestSubroundStartRound_GetPkToDisplayShouldTrim(t *testing.T) {
pk := "1234567891234"
pkToDisplay := core.GetTrimmedPk(pk)
assert.Equal(t, "123456789123...", pkToDisplay)
assert.Equal(t, "123456789123", pkToDisplay)
}

func TestSubroundStartRound_GetPkToDisplayShouldNotTrim(t *testing.T) {
Expand Down

0 comments on commit d07c1c2

Please sign in to comment.