Ejemplo n.º 1
0
 def test_split_build_flags_ldflags(self):
     actual = GoCompile._split_build_flags(' '.join([
         'compile', 'contrib/go/examples/src/go/server',
         '--compile-go-build-flags="--ldflags \'-extldflags \"-static\"\'"'
     ]))
     expected = [
         'compile',
         'contrib/go/examples/src/go/server',
         "--compile-go-build-flags=--ldflags '-extldflags -static'",
     ]
     self.assertEqual(actual, expected)
Ejemplo n.º 2
0
 def test_split_build_flags_ldflags(self):
   actual = GoCompile._split_build_flags(' '.join([
     'compile',
     'contrib/go/examples/src/go/server',
     '--compile-go-build-flags="--ldflags \'-extldflags \"-static\"\'"'
   ]))
   expected = [
     'compile',
     'contrib/go/examples/src/go/server',
     "--compile-go-build-flags=--ldflags '-extldflags -static'",
   ]
   self.assertEqual(actual, expected)
Ejemplo n.º 3
0
 def test_split_build_flags_ldflags(self):
     actual = GoCompile._split_build_flags(" ".join([
         "compile",
         "contrib/go/examples/src/go/server",
         '--compile-go-build-flags="--ldflags \'-extldflags "-static"\'"',
     ]))
     expected = [
         "compile",
         "contrib/go/examples/src/go/server",
         "--compile-go-build-flags=--ldflags '-extldflags -static'",
     ]
     self.assertEqual(actual, expected)
Ejemplo n.º 4
0
 def test_split_build_flags_simple(self):
     actual = GoCompile._split_build_flags("-v -race")
     expected = ['-v', '-race']
     self.assertEqual(actual, expected)
Ejemplo n.º 5
0
 def test_split_build_flags_nested_quotes(self):
     actual = GoCompile._split_build_flags(
         "--ldflags \'-extldflags \"-static\"\'")
     expected = ['--ldflags', '-extldflags "-static"']
     self.assertEqual(actual, expected)
Ejemplo n.º 6
0
 def test_split_build_flags_single_quoted(self):
     actual = GoCompile._split_build_flags("-v -race -tags 'tag list'")
     expected = ['-v', '-race', '-tags', "tag list"]
     self.assertEqual(actual, expected)
Ejemplo n.º 7
0
 def test_split_build_flags_nested_quotes(self):
   actual = GoCompile._split_build_flags("--ldflags \'-extldflags \"-static\"\'")
   expected = ['--ldflags', '-extldflags "-static"']
   self.assertEqual(actual, expected)
Ejemplo n.º 8
0
 def test_split_build_flags_single_quoted(self):
   actual = GoCompile._split_build_flags("-v -race -tags 'tag list'")
   expected = ['-v', '-race', '-tags', "tag list"]
   self.assertEqual(actual, expected)
Ejemplo n.º 9
0
 def test_split_build_flags_simple(self):
   actual = GoCompile._split_build_flags("-v -race")
   expected = ['-v', '-race']
   self.assertEqual(actual, expected)