github.com/blend/go-sdk@v1.20220411.3/copyright/main_test.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package copyright 9 10 import ( 11 "testing" 12 13 "github.com/blend/go-sdk/logger" 14 "github.com/blend/go-sdk/testutil" 15 ) 16 17 func TestMain(m *testing.M) { 18 testutil.MarkUpdateGoldenFlag() 19 20 testutil.New( 21 m, 22 testutil.OptLog(logger.All()), 23 ).Run() 24 } 25 26 const goBuildTags1 = `//go:build tag1 27 // +build tag1 28 29 package main 30 31 import ( 32 "fmt" 33 ) 34 35 func main() { 36 fmt.Println("foo") 37 } 38 ` 39 const goBuildTags2 = `// +build tag5 40 //go:build tag1 && tag2 && tag3 41 // +build tag1,tag2,tag3 42 // +build tag6 43 44 package main 45 46 import ( 47 "fmt" 48 ) 49 50 func main() { 51 fmt.Println("foo") 52 } 53 54 // +bulid tag9000 55 ` 56 57 const goBuildTags3 = `//go:build tag1 & tag2 58 59 package main 60 61 import ( 62 "fmt" 63 ) 64 65 func main() { 66 fmt.Println("foo") 67 } 68 69 //go:build tag3 70 ` 71 72 const goldenGoBuildTags1 = `//go:build tag1 73 // +build tag1 74 75 /* 76 77 Copyright (c) 2001 - Present. Blend Labs, Inc. All rights reserved 78 Blend Confidential - Restricted 79 80 */ 81 82 package main 83 84 import ( 85 "fmt" 86 ) 87 88 func main() { 89 fmt.Println("foo") 90 } 91 ` 92 93 const goldenGoBuildTags2 = `// +build tag5 94 //go:build tag1 && tag2 && tag3 95 // +build tag1,tag2,tag3 96 // +build tag6 97 98 /* 99 100 Copyright (c) 2001 - Present. Blend Labs, Inc. All rights reserved 101 Blend Confidential - Restricted 102 103 */ 104 105 package main 106 107 import ( 108 "fmt" 109 ) 110 111 func main() { 112 fmt.Println("foo") 113 } 114 115 // +bulid tag9000 116 ` 117 118 const goldenGoBuildTags3 = `//go:build tag1 & tag2 119 120 /* 121 122 Copyright (c) 2001 - Present. Blend Labs, Inc. All rights reserved 123 Blend Confidential - Restricted 124 125 */ 126 127 package main 128 129 import ( 130 "fmt" 131 ) 132 133 func main() { 134 fmt.Println("foo") 135 } 136 137 //go:build tag3 138 ` 139 140 const goldenTsReferenceTags = `/// <reference path="../types/testing.d.ts" /> 141 /// <reference path="../types/something.d.ts" /> 142 /// <reference path="../types/somethingElse.d.ts" /> 143 /// <reference path="../types/somethingMore.d.ts" /> 144 /// <reference path="../types/somethingLess.d.ts" /> 145 /** 146 * Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 147 * Blend Confidential - Restricted 148 */ 149 export * from '../types/goodOnes' 150 ` 151 152 const tsReferenceTags = `/// <reference path="../types/testing.d.ts" /> 153 /// <reference path="../types/something.d.ts" /> 154 /// <reference path="../types/somethingElse.d.ts" /> 155 /// <reference path="../types/somethingMore.d.ts" /> 156 /// <reference path="../types/somethingLess.d.ts" /> 157 export * from '../types/goodOnes' 158 ` 159 160 const goldenTsReferenceTag = `/// <reference path="../types/testing.d.ts" /> 161 /** 162 * Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 163 * Blend Confidential - Restricted 164 */ 165 166 export * from '../types/goodOnes' 167 ` 168 169 const tsReferenceTag = `/// <reference path="../types/testing.d.ts" /> 170 171 export * from '../types/goodOnes' 172 ` 173 174 const tsTest = `export * from '../types/goodOnes' 175 ` 176 177 const goldenTs = `/** 178 * Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 179 * Blend Confidential - Restricted 180 */ 181 export * from '../types/goodOnes' 182 `