samples/drivers/adc: Fix output specification
This is a follow-up to commit f5ffd05e6b
.
Since twister removes leading spaces from received lines before
further processing, the regular expression for checking the output
produced by the sample cannot contain such space. Also negative
values read from ADC channels need to be allowed.
For consistency, remove the leading space also in the actual string
printed by the sample.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
554aa9cde3
commit
a78e7c5c90
2 changed files with 2 additions and 2 deletions
|
@ -15,4 +15,4 @@ tests:
|
|||
type: multi_line
|
||||
regex:
|
||||
- "ADC reading:"
|
||||
- " - .+, channel \\d+: \\d+"
|
||||
- "- .+, channel \\d+: -?\\d+"
|
||||
|
|
|
@ -141,7 +141,7 @@ void main(void)
|
|||
while (1) {
|
||||
printk("ADC reading:\n");
|
||||
for (uint8_t i = 0; i < ARRAY_SIZE(adc_channels); i++) {
|
||||
printk(" - %s, channel %d: ",
|
||||
printk("- %s, channel %d: ",
|
||||
adc_labels[i], adc_channels[i].channel_id);
|
||||
|
||||
prepare_sequence(&sequence, &adc_channels[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue