forked from mirror/oddmu
The code for missing links was improved. The links function was fixed so that it only joined page directory and link destination for relative URLs.
17 lines
349 B
Go
17 lines
349 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"github.com/google/subcommands"
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestLinksCmd(t *testing.T) {
|
|
b := new(bytes.Buffer)
|
|
s := linksCli(b, []string{"README"})
|
|
assert.Equal(t, subcommands.ExitSuccess, s)
|
|
x := b.String()
|
|
assert.Contains(t, x, "https://alexschroeder.ch/view/oddmu/oddmu.1\n")
|
|
}
|