18 lines · 317 B · Go
RawDownload
// Copyright 2024 The Forgejo Authors// SPDX-License-Identifier: MIT package test import (	"testing" 	"github.com/stretchr/testify/assert") func TestMockProtect(t *testing.T) {	mockable := "original"	restore := MockProtect(&mockable)	mockable = "tainted"	restore()	assert.Equal(t, "original", mockable)}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t