Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / gen-css-properties.py
blob1d6fad226db39c6e6d1dd0411363d272c7e13807
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 import os
6 import sys
7 import subprocess
10 def main(output, css_properties, exe):
11 # moz.build passes in the exe name without any path, so to run it we need to
12 # prepend the './'
13 run_exe = exe if os.path.isabs(exe) else "./%s" % exe
15 # Use universal_newlines so everything is '\n', which gets converted to
16 # '\r\n' when writing out the file in Windows.
17 data = subprocess.check_output([run_exe], universal_newlines=True)
18 with open(css_properties) as f:
19 data += f.read()
20 output.write(data)
23 if __name__ == "__main__":
24 main(sys.stdout, *sys.argv[1:])