mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	tpl: Fix broken chomp test
This commit is contained in:
		@@ -1600,10 +1600,10 @@ func TestApply(t *testing.T) {
 | 
			
		||||
	noStringers := []interface{}{tstNoStringer{}, tstNoStringer{}}
 | 
			
		||||
 | 
			
		||||
	chomped, _ := apply(strings, "chomp", ".")
 | 
			
		||||
	assert.Equal(t, []interface{}{"a", "b"}, chomped)
 | 
			
		||||
	assert.Equal(t, []interface{}{template.HTML("a"), template.HTML("b")}, chomped)
 | 
			
		||||
 | 
			
		||||
	chomped, _ = apply(strings, "chomp", "c\n")
 | 
			
		||||
	assert.Equal(t, []interface{}{"c", "c"}, chomped)
 | 
			
		||||
	assert.Equal(t, []interface{}{template.HTML("c"), template.HTML("c")}, chomped)
 | 
			
		||||
 | 
			
		||||
	chomped, _ = apply(nil, "chomp", ".")
 | 
			
		||||
	assert.Equal(t, []interface{}{}, chomped)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user