1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/phydat_dump: use raw strings in expect regexp

This commit is contained in:
Alexandre Abadie 2020-11-03 15:50:15 +01:00
parent 3e3da1217d
commit 7010e331e2
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -11,56 +11,56 @@ from testrunner import run
def testfunc(child):
child.expect('Visual phydat test application\r\n')
child.expect('Data:\t 12.34 °C\r\n')
child.expect('Data:\t 12.34 °F\r\n')
child.expect('Data:\t 123.4 K\r\n')
child.expect('Data:\t 123.4 lx\r\n')
child.expect('Data:\t\[0\] 1234 m\r\n')
child.expect('\t\[1\] 13456 m\r\n')
child.expect('\t\[2\] -14567 m\r\n')
child.expect('Data:\t\[0\] 1234e1 m\r\n')
child.expect('\t\[1\] 13456e1 m\r\n')
child.expect('\t\[2\] -14567e1 m\r\n')
child.expect('Data:\t\[0\] 1234 km\r\n')
child.expect('\t\[1\] 13456 km\r\n')
child.expect('\t\[2\] -14567 km\r\n')
child.expect('Data:\t\[0\] 12.34 m\r\n')
child.expect('\t\[1\] 134.56 m\r\n')
child.expect('\t\[2\] -145.67 m\r\n')
child.expect('Data:\t\[0\] 1234 mm\r\n')
child.expect('\t\[1\] 13456 mm\r\n')
child.expect('\t\[2\] -14567 mm\r\n')
child.expect('Data:\t -0.12345 m\^2\r\n')
child.expect('Data:\t -12345e-6 m\^3\r\n')
child.expect('Data:\t\[0\] 0.12 g\r\n')
child.expect('\t\[1\] 0.34 g\r\n')
child.expect('\t\[2\] 56.78 g\r\n')
child.expect('Data:\t\[0\] 123 mdps\r\n')
child.expect('\t\[1\] 345 mdps\r\n')
child.expect('\t\[2\] 678 mdps\r\n')
child.expect('Data:\t 1234.5 G\r\n')
child.expect('Data:\t 12345 kA\r\n')
child.expect('Data:\t 12345 MV\r\n')
child.expect('Data:\t 12345e7 W\r\n')
child.expect('Data:\t 1234.5 Gs\r\n')
child.expect('Data:\t 12.345 dBm\r\n')
child.expect('Data:\t 12345 C\r\n')
child.expect('Data:\t 12345 uF\r\n')
child.expect('Data:\t 12345e-7 F\r\n')
child.expect('Data:\t 123.45 pH\r\n')
child.expect('Data:\t 12345 Bar\r\n')
child.expect('Data:\t 12345 hPa\r\n')
child.expect('Data:\t 123.45 cd\r\n')
child.expect('Data:\t 12345 mcts\r\n')
child.expect('Data:\t 12.345 %\r\n')
child.expect('Data:\t 1.2345 permille\r\n')
child.expect('Data:\t 12345 uppm\r\n')
child.expect('Data:\t 12345 nppb\r\n')
child.expect('Data:\t 1234.5 g/m\^3\r\n')
child.expect('Data:\t 1234.5 #/m\^3\r\n')
child.expect('Data:\t12:34:56\r\n')
child.expect('Data:\t2020-02-27\r\n')
child.expect(r'Visual phydat test application\r\n')
child.expect(r'Data:\t 12.34 °C\r\n')
child.expect(r'Data:\t 12.34 °F\r\n')
child.expect(r'Data:\t 123.4 K\r\n')
child.expect(r'Data:\t 123.4 lx\r\n')
child.expect(r'Data:\t\[0\] 1234 m\r\n')
child.expect(r'\t\[1\] 13456 m\r\n')
child.expect(r'\t\[2\] -14567 m\r\n')
child.expect(r'Data:\t\[0\] 1234e1 m\r\n')
child.expect(r'\t\[1\] 13456e1 m\r\n')
child.expect(r'\t\[2\] -14567e1 m\r\n')
child.expect(r'Data:\t\[0\] 1234 km\r\n')
child.expect(r'\t\[1\] 13456 km\r\n')
child.expect(r'\t\[2\] -14567 km\r\n')
child.expect(r'Data:\t\[0\] 12.34 m\r\n')
child.expect(r'\t\[1\] 134.56 m\r\n')
child.expect(r'\t\[2\] -145.67 m\r\n')
child.expect(r'Data:\t\[0\] 1234 mm\r\n')
child.expect(r'\t\[1\] 13456 mm\r\n')
child.expect(r'\t\[2\] -14567 mm\r\n')
child.expect(r'Data:\t -0.12345 m\^2\r\n')
child.expect(r'Data:\t -12345e-6 m\^3\r\n')
child.expect(r'Data:\t\[0\] 0.12 g\r\n')
child.expect(r'\t\[1\] 0.34 g\r\n')
child.expect(r'\t\[2\] 56.78 g\r\n')
child.expect(r'Data:\t\[0\] 123 mdps\r\n')
child.expect(r'\t\[1\] 345 mdps\r\n')
child.expect(r'\t\[2\] 678 mdps\r\n')
child.expect(r'Data:\t 1234.5 G\r\n')
child.expect(r'Data:\t 12345 kA\r\n')
child.expect(r'Data:\t 12345 MV\r\n')
child.expect(r'Data:\t 12345e7 W\r\n')
child.expect(r'Data:\t 1234.5 Gs\r\n')
child.expect(r'Data:\t 12.345 dBm\r\n')
child.expect(r'Data:\t 12345 C\r\n')
child.expect(r'Data:\t 12345 uF\r\n')
child.expect(r'Data:\t 12345e-7 F\r\n')
child.expect(r'Data:\t 123.45 pH\r\n')
child.expect(r'Data:\t 12345 Bar\r\n')
child.expect(r'Data:\t 12345 hPa\r\n')
child.expect(r'Data:\t 123.45 cd\r\n')
child.expect(r'Data:\t 12345 mcts\r\n')
child.expect(r'Data:\t 12.345 %\r\n')
child.expect(r'Data:\t 1.2345 permille\r\n')
child.expect(r'Data:\t 12345 uppm\r\n')
child.expect(r'Data:\t 12345 nppb\r\n')
child.expect(r'Data:\t 1234.5 g/m\^3\r\n')
child.expect(r'Data:\t 1234.5 #/m\^3\r\n')
child.expect(r'Data:\t12:34:56\r\n')
child.expect(r'Data:\t2020-02-27\r\n')
if __name__ == "__main__":