File: os_test.go

package info (click to toggle)
golang-github-go-git-go-billy 5.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: makefile: 10
file content (24 lines) | stat: -rw-r--r-- 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//go:build !js
// +build !js

package osfs

import (
	"reflect"
	"testing"
)

func TestDefault(t *testing.T) {
	want := &ChrootOS{}
	got := Default

	if reflect.TypeOf(got) != reflect.TypeOf(want) {
		t.Errorf("wanted Default to be %T got %T", want, got)
	}
}

func TestNewAPI(t *testing.T) {
	_ = New("/")
	_ = New("/", WithBoundOS())
	_ = New("/", WithChrootOS())
}