blob: 14d76d820f6733e1008111df2c228510edef949b [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005import unittest
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006from oeqa.sdk.case import OESDKTestCase
7
Brad Bishop19323692019-04-05 15:28:33 -04008from oeqa.utils.subprocesstweak import errors_have_output
9errors_have_output()
10
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011class PerlTest(OESDKTestCase):
Brad Bishop19323692019-04-05 15:28:33 -040012 def setUp(self):
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013 if not (self.tc.hasHostPackage("nativesdk-perl") or
14 self.tc.hasHostPackage("perl-native")):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015 raise unittest.SkipTest("No perl package in the SDK")
16
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017 def test_perl(self):
Brad Bishop19323692019-04-05 15:28:33 -040018 cmd = "perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'"
19 output = self._run(cmd)
20 self.assertEqual(output, "Hello, world")