1# 2# Copyright OpenEmbedded Contributors 3# 4# SPDX-License-Identifier: MIT 5# 6 7import unittest 8from oeqa.sdk.case import OESDKTestCase 9 10from oeqa.utils.subprocesstweak import errors_have_output 11errors_have_output() 12 13class PerlTest(OESDKTestCase): 14 def setUp(self): 15 if not (self.tc.hasHostPackage("nativesdk-perl") or 16 self.tc.hasHostPackage("perl-native")): 17 raise unittest.SkipTest("No perl package in the SDK") 18 19 def test_perl(self): 20 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") 23