aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-06-09 14:57:15 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-08-15 09:36:18 -0400
commit59d4f771d280cbea0d0afc9579e127225751c028 (patch)
tree6454a837f8d8e95ddb69331756e54bcbf03b86f1 /unittests
parentc2592bc921f9357a187d241b233f2be0178195e9 (diff)
downloadmeson-59d4f771d280cbea0d0afc9579e127225751c028.zip
meson-59d4f771d280cbea0d0afc9579e127225751c028.tar.gz
meson-59d4f771d280cbea0d0afc9579e127225751c028.tar.bz2
editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py2
-rw-r--r--unittests/baseplatformtests.py1
-rw-r--r--unittests/darwintests.py1
-rw-r--r--unittests/datatests.py1
-rw-r--r--unittests/failuretests.py1
-rw-r--r--unittests/linuxcrosstests.py1
-rw-r--r--unittests/linuxliketests.py11
-rw-r--r--unittests/machinefiletests.py1
-rw-r--r--unittests/pythontests.py1
-rw-r--r--unittests/rewritetests.py1
-rw-r--r--unittests/subprojectscommandtests.py1
-rw-r--r--unittests/taptests.py1
12 files changed, 5 insertions, 18 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index 92a9caf..b296341 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -3761,5 +3761,3 @@ class AllPlatformTests(BasePlatformTests):
cc = detect_compiler_for(env, 'c', MachineChoice.HOST)
link_args = env.coredata.get_external_link_args(cc.for_machine, cc.language)
self.assertEqual(sorted(link_args), sorted(['-flto']))
-
-
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py
index 69ad0a1..7a3830e 100644
--- a/unittests/baseplatformtests.py
+++ b/unittests/baseplatformtests.py
@@ -435,4 +435,3 @@ class BasePlatformTests(TestCase):
def assertPathDoesNotExist(self, path):
m = f'Path {path!r} should not exist'
self.assertFalse(os.path.exists(path), msg=m)
-
diff --git a/unittests/darwintests.py b/unittests/darwintests.py
index cff0d0c..6bf15aa 100644
--- a/unittests/darwintests.py
+++ b/unittests/darwintests.py
@@ -148,4 +148,3 @@ class DarwinTests(BasePlatformTests):
testdir = os.path.join(self.objcpp_test_dir, '1 simple')
self.init(testdir)
self.assertIn('-std=c++14', self.get_compdb()[0]['command'])
-
diff --git a/unittests/datatests.py b/unittests/datatests.py
index f8d20ef..6f4f421 100644
--- a/unittests/datatests.py
+++ b/unittests/datatests.py
@@ -269,4 +269,3 @@ class DataTests(unittest.TestCase):
errors += [i[0]]
self.assertListEqual(errors, [], err_msg + 'Files were changed')
-
diff --git a/unittests/failuretests.py b/unittests/failuretests.py
index fd485fa..b5ecf37 100644
--- a/unittests/failuretests.py
+++ b/unittests/failuretests.py
@@ -390,4 +390,3 @@ class FailureTests(BasePlatformTests):
def test_error_func(self):
self.assertMesonRaises("error('a', 'b', ['c', ['d', {'e': 'f'}]], 'g')",
r"Problem encountered: a b \['c', \['d', {'e' : 'f'}\]\] g")
-
diff --git a/unittests/linuxcrosstests.py b/unittests/linuxcrosstests.py
index 5916a90..b3eecc8 100644
--- a/unittests/linuxcrosstests.py
+++ b/unittests/linuxcrosstests.py
@@ -190,4 +190,3 @@ class LinuxCrossMingwTests(BaseLinuxCrossTests):
'-Dbuild.pkg_config_path=' + os.path.join(testdir, 'build_extra_path'),
'-Dpkg_config_path=' + os.path.join(testdir, 'host_extra_path'),
])
-
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py
index d3067bb..a86c3dc 100644
--- a/unittests/linuxliketests.py
+++ b/unittests/linuxliketests.py
@@ -1297,7 +1297,7 @@ class LinuxlikeTests(BasePlatformTests):
out = self._run(['otool', '-L', f])
# Ensure that the otool output does not contain self.installdir
self.assertNotRegex(out, self.installdir + '.*dylib ')
-
+
@skipIfNoPkgconfig
def test_link_arg_fullname(self):
'''
@@ -1320,19 +1320,19 @@ class LinuxlikeTests(BasePlatformTests):
'PKG_CONFIG_PATH': os.path.join(installdir, self.libdir, 'pkgconfig')}
testdir = os.path.join(self.unit_test_dir, '97 link full name','proguser')
self.init(testdir,override_envvars=env)
-
+
# test for link with full path
with open(os.path.join(self.builddir, 'build.ninja'), encoding='utf-8') as bfile:
for line in bfile:
if 'build dprovidertest:' in line:
self.assertIn('/libtestprovider.a', line)
-
+
if is_osx():
# macOS's ld do not supports `--whole-archive`, skip build & run
return
-
+
self.build(override_envvars=env)
-
+
# skip test if pkg-config is too old.
# before v0.28, Libs flags like -Wl will not kept in context order with -l flags.
# see https://gitlab.freedesktop.org/pkg-config/pkg-config/-/blob/master/NEWS
@@ -1689,4 +1689,3 @@ class LinuxlikeTests(BasePlatformTests):
obj_files = p.stdout.strip().split('\n')
self.assertEqual(len(obj_files), 1)
self.assertTrue(obj_files[0].endswith('-prelink.o'))
-
diff --git a/unittests/machinefiletests.py b/unittests/machinefiletests.py
index 7022c0a..0a756b5 100644
--- a/unittests/machinefiletests.py
+++ b/unittests/machinefiletests.py
@@ -933,4 +933,3 @@ class CrossFileTests(BasePlatformTests):
break
else:
self.fail('Did not find expected option.')
-
diff --git a/unittests/pythontests.py b/unittests/pythontests.py
index 7a709f0..c8efbdd 100644
--- a/unittests/pythontests.py
+++ b/unittests/pythontests.py
@@ -80,4 +80,3 @@ class PythonTests(BasePlatformTests):
with self.assertRaises(unittest.SkipTest):
self.init(testdir, extra_args=['-Dpython=dir'])
self.wipe()
-
diff --git a/unittests/rewritetests.py b/unittests/rewritetests.py
index 72704bb..f03de0a 100644
--- a/unittests/rewritetests.py
+++ b/unittests/rewritetests.py
@@ -345,4 +345,3 @@ class RewriterTests(BasePlatformTests):
}
}
self.assertDictEqual(out, expected)
-
diff --git a/unittests/subprojectscommandtests.py b/unittests/subprojectscommandtests.py
index e2aebfc..edb8da6 100644
--- a/unittests/subprojectscommandtests.py
+++ b/unittests/subprojectscommandtests.py
@@ -284,4 +284,3 @@ class SubprojectsCommandTests(BasePlatformTests):
self.assertFalse(Path(self.subprojects_dir / 'sub_file').exists())
self.assertFalse(Path(self.subprojects_dir / 'sub_git').exists())
self.assertFalse(Path(self.subprojects_dir / 'redirect.wrap').exists())
-
diff --git a/unittests/taptests.py b/unittests/taptests.py
index 0d8d4a6..54946cf 100644
--- a/unittests/taptests.py
+++ b/unittests/taptests.py
@@ -289,4 +289,3 @@ class TAPParserTests(unittest.TestCase):
self.assert_error(events)
self.assert_test(events, number=2, name='', result=TestResult.FAIL)
self.assert_last(events)
-