diff options
Diffstat (limited to 'test/test_data.lua')
| -rw-r--r-- | test/test_data.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_data.lua b/test/test_data.lua index 3e741e6..4def123 100644 --- a/test/test_data.lua +++ b/test/test_data.lua @@ -274,4 +274,18 @@ assert(data.board_name(nil, nil) == nil, 'neither gives nil') assert(data.board_name('To Be Filled By O.E.M.\n', 'To Be Filled By O.E.M.\n') == nil, 'placeholder DMI gives nil') +-- Three Intel forms the single fixture does not cover. The first fixture +-- happens to carry a literal 'CPU' before the clock, so a pattern requiring +-- that token passes the fixture and still leaves '@ 2.40GHz' on the card for +-- every other Intel part. These exist so the stripping stays a rule. +assert(data.cpu_model('model name\t: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz\n') + == 'Xeon E5-2680 v4', + 'xeon, got ' .. tostring(data.cpu_model('model name\t: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz\n'))) +assert(data.cpu_model('model name\t: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz\n') + == 'Core i7-1165G7', + 'tiger lake, got ' .. tostring(data.cpu_model('model name\t: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz\n'))) +assert(data.cpu_model('model name\t: AMD Ryzen 9 7950X3D 16-Core Processor\n') + == 'Ryzen 9 7950X3D', + 'x3d, got ' .. tostring(data.cpu_model('model name\t: AMD Ryzen 9 7950X3D 16-Core Processor\n'))) + print('test_data: all assertions passed') |
