In #tvix-dev, we want to display only CLs that relate to tvix and related projects. So use a pretty dumb allow-list for which CLs to display in that channel. Change-Id: I3ef50b64e3d7fbc27a6690be6a10f1b55c04cd6e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11658 Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: lukegb <lukegb@tvl.fyi> Tested-by: BuildkiteCI
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			475 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			475 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package main
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func TestChangeShouldBeSkipped(t *testing.T) {
 | |
| 	dontSkipAny := ""
 | |
| 	if changeShouldBeSkipped(dontSkipAny, "mysubject") {
 | |
| 		t.Fatal("dontSkipAny should not not be skip any")
 | |
| 	}
 | |
| 
 | |
| 	showThese := "A,B"
 | |
| 	if changeShouldBeSkipped(showThese, "A") {
 | |
| 		t.Fatal("A should be shown")
 | |
| 	}
 | |
| 	if changeShouldBeSkipped(showThese, "B") {
 | |
| 		t.Fatal("B should be shown")
 | |
| 	}
 | |
| 	if !changeShouldBeSkipped(showThese, "C") {
 | |
| 		t.Fatal("C should not be shown")
 | |
| 	}
 | |
| 
 | |
| }
 |