mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
tests: Add another formatter test
This commit is contained in:
parent
8d7103dbe5
commit
455924e22f
2 changed files with 19 additions and 1 deletions
18
tests/formatting/correct1.blp
Normal file
18
tests/formatting/correct1.blp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using Gtk 4.0;
|
||||||
|
|
||||||
|
template $MyTemplate: Label {
|
||||||
|
/**
|
||||||
|
* A list of strings.
|
||||||
|
*/
|
||||||
|
StringList {
|
||||||
|
// comment
|
||||||
|
strings [
|
||||||
|
'Hello',
|
||||||
|
C_('Greeting', 'World'),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
object: Button {
|
||||||
|
label: 'Click me';
|
||||||
|
};
|
||||||
|
}
|
|
@ -18,7 +18,6 @@
|
||||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
|
|
||||||
|
|
||||||
import difflib
|
|
||||||
import unittest
|
import unittest
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
@ -45,3 +44,4 @@ class TestFormatter(unittest.TestCase):
|
||||||
def test_formatter(self):
|
def test_formatter(self):
|
||||||
self.assert_format_test("in1.blp", "out.blp")
|
self.assert_format_test("in1.blp", "out.blp")
|
||||||
self.assert_format_test("in2.blp", "out.blp")
|
self.assert_format_test("in2.blp", "out.blp")
|
||||||
|
self.assert_format_test("correct1.blp", "correct1.blp")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue