blob: b8adc5ac72d856ed8a8a9fbe0571c82bf7b6a141 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001import unittest
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002from oeqa.sdk.case import OESDKTestCase
3
Brad Bishop19323692019-04-05 15:28:33 -04004from oeqa.utils.subprocesstweak import errors_have_output
5errors_have_output()
6
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007class PerlTest(OESDKTestCase):
Brad Bishop19323692019-04-05 15:28:33 -04008 def setUp(self):
Brad Bishopd7bf8c12018-02-25 22:55:05 -05009 if not (self.tc.hasHostPackage("nativesdk-perl") or
10 self.tc.hasHostPackage("perl-native")):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011 raise unittest.SkipTest("No perl package in the SDK")
12
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013 def test_perl(self):
Brad Bishop19323692019-04-05 15:28:33 -040014 cmd = "perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'"
15 output = self._run(cmd)
16 self.assertEqual(output, "Hello, world")