• Home
  • Raw
  • Download

Lines Matching full:shell

15 """Unit tests for shell.bzl."""
17 load("//lib:shell.bzl", "shell")
21 """Unit tests for shell.array_literal."""
24 asserts.equals(env, "()", shell.array_literal([]))
25 asserts.equals(env, "('1')", shell.array_literal([1]))
26 asserts.equals(env, "('1' '2' '3')", shell.array_literal([1, 2, 3]))
27 asserts.equals(env, "('$foo')", shell.array_literal(["$foo"]))
28 asserts.equals(env, "('qu\"o\"te')", shell.array_literal(['qu"o"te']))
35 """Unit tests for shell.quote."""
38 asserts.equals(env, "'foo'", shell.quote("foo"))
39 asserts.equals(env, "'foo bar'", shell.quote("foo bar"))
40 asserts.equals(env, "'three spaces'", shell.quote("three spaces"))
41 asserts.equals(env, "' leading'", shell.quote(" leading"))
42 asserts.equals(env, "'trailing '", shell.quote("trailing "))
43 asserts.equals(env, "'new\nline'", shell.quote("new\nline"))
44 asserts.equals(env, "'tab\tcharacter'", shell.quote("tab\tcharacter"))
45 asserts.equals(env, "'$foo'", shell.quote("$foo"))
46 asserts.equals(env, "'qu\"o\"te'", shell.quote('qu"o"te'))
47 asserts.equals(env, "'it'\\''s'", shell.quote("it's"))
48 asserts.equals(env, "'foo\\bar'", shell.quote("foo\\bar"))
49 asserts.equals(env, "'back`echo q`uote'", shell.quote("back`echo q`uote"))
73 "myarray=" + shell.array_literal(args),
77 # The following is a shell representation of what the echo of the quoted
78 # array will look like. It looks a bit confusing considering it's shell
79 # quoted into Python. Shell using single quotes to minimize shell
99 """Creates the test targets and test suite for shell.bzl tests."""