blob: e1d2bc159a07361ec9d4612ce6de4e4b169244aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import unittest
from oeqa.sdk.case import OESDKTestCase
class PerlTest(OESDKTestCase):
def setUp(self):
if not (self.tc.hasHostPackage("nativesdk-perl") or
self.tc.hasHostPackage("perl-native")):
raise unittest.SkipTest("No perl package in the SDK")
def test_perl(self):
try:
cmd = "perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'"
output = self._run(cmd)
self.assertEqual(output, "Hello, world")
except subprocess.CalledProcessError as e:
self.fail("Unexpected exit %d (output %s)" % (e.returncode, e.output))
|