require "testing_env" require "tempfile" class UtilTests < Homebrew::TestCase def setup @dir = Pathname.new(mktmpdir) end def teardown @dir.rmtree end def test_put_columns_empty # Issue #217 put columns with new results fails. assert_silent { puts_columns [] } end def test_which cmd = @dir/"foo" FileUtils.touch cmd cmd.chmod 0744 assert_equal Pathname.new(cmd), which(File.basename(cmd), File.dirname(cmd)) end def test_which_skip_non_executables cmd = @dir/"foo" FileUtils.touch cmd assert_nil which(File.basename(cmd), File.dirname(cmd)) end def test_which_skip_malformed_path # 'which' should not fail if a path is malformed # see https://github.com/Homebrew/homebrew/issues/32789 for an example cmd = @dir/"foo" FileUtils.touch cmd cmd.chmod 0744 # ~~ will fail because ~foo resolves to foo's home and there is no '~' user # here assert_equal Pathname.new(cmd), which(File.basename(cmd), "~~#{File::PATH_SEPARATOR}#{File.dirname(cmd)}") end def test_popen_read out = Utils.popen_read("/bin/sh", "-c", "echo success").chomp assert_equal "success", out assert_predicate $?, :success? end end ='model-serializer-api'>model-serializer-api Web APIs for Django.
aboutsummaryrefslogtreecommitdiffstats
path: root/docs/css/prettify.css
blob: d437aff62bbbaabb783fa7acd89c9850287f1f6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.com { color: #93a1a1; }
.lit { color: #195f91; }
.pun, .opn, .clo { color: #93a1a1; }
.fun { color: #dc322f; }
.str, .atv { color: #D14; }
.kwd, .prettyprint .tag { color: #1e347b; }
.typ, .atn, .dec, .var { color: teal; }
.pln { color: #48484c; }

.prettyprint {
  padding: 8px;
  background-color: #f7f7f9;
  border: 1px solid #e1e1e8;
}
.prettyprint.linenums {
  -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
     -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
          box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
}

/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
  margin: 0 0 0 33px; /* IE indents via margin-left */
}
ol.linenums li {
  padding-left: 12px;
  color: #bebec5;
  line-height: 20px;
  text-shadow: 0 1px 0 #fff;
}