File: add_executable_tests.py

package info (click to toggle)
cmake-format 0.6.13-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,436 kB
  • sloc: python: 16,990; makefile: 14
file content (27 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (4)
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
# pylint: disable=bad-continuation
from __future__ import unicode_literals
import unittest

from cmakelang.command_tests import TestBase


class TestAddExecutableCommand(TestBase):
  """
  Test various examples of add_executable()
  """
  kExpectNumSidecarTests = 6

  def test_sort_arguments(self):
    self.config.format.autosort = True
    self.source_str = """\
add_executable(foobar WIN32 sourcefile_04.cc sourcefile_02.cc sourcefile_03.cc
                            sourcefile_01.cc)
"""
    self.expect_format = """\
add_executable(foobar WIN32 sourcefile_01.cc sourcefile_02.cc sourcefile_03.cc
                            sourcefile_04.cc)
"""


if __name__ == '__main__':
  unittest.main()