fork/gdu
git clone https://git.julia.blue/fork/gdu
516c421
subvolume
1package tui 2 3import ( 4"testing" 5 6"github.com/stretchr/testify/assert" 7) 8 9func TestCollapsedPathStruct (t * testing.T ) { 10// Test CollapsedPath struct creation and fields 11cp := & CollapsedPath { 12DisplayName :"test/path" , 13DeepestDir :nil , 14Segments : []string {"test" ,"path" }, 15 } 16 17assert .Equal (t ,"test/path" ,cp .DisplayName ) 18assert .Nil (t ,cp .DeepestDir ) 19assert .Equal (t , []string {"test" ,"path" },cp .Segments ) 20} 21 22func TestFindCollapsedParentNilCases (t * testing.T ) { 23// Test nil input 24result := findCollapsedParent (nil ) 25assert .Nil (t ,result ) 26} 27 28// Test that our new functions exist and don't panic with basic inputs 29func TestFunctionExistence (t * testing.T ) { 30// Test that findCollapsiblePath exists and handles nil gracefully 31result := findCollapsiblePath (nil ) 32assert .Nil (t ,result ) 33}