blob: 8eab4442e85873aa1cba0d37f395df8e0e4bcf57 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
Patrick Williams92b42cb2022-09-03 06:53:57 -05002# Copyright OpenEmbedded Contributors
3#
Brad Bishopc342db32019-05-15 21:57:59 -04004# SPDX-License-Identifier: MIT
5#
6
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007import unittest
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008from oeqa.sdk.case import OESDKTestCase
9
Brad Bishop19323692019-04-05 15:28:33 -040010from oeqa.utils.subprocesstweak import errors_have_output
11errors_have_output()
12
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013class PerlTest(OESDKTestCase):
Brad Bishop19323692019-04-05 15:28:33 -040014 def setUp(self):
Brad Bishopd7bf8c12018-02-25 22:55:05 -050015 if not (self.tc.hasHostPackage("nativesdk-perl") or
16 self.tc.hasHostPackage("perl-native")):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017 raise unittest.SkipTest("No perl package in the SDK")
18
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 def test_perl(self):
Brad Bishop19323692019-04-05 15:28:33 -040020 cmd = "perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'"
21 output = self._run(cmd)
22 self.assertEqual(output, "Hello, world")