Fix menu declaration test too

This commit is contained in:
Andrew Johnson
2019-09-06 10:44:02 +02:00
parent 623539c3e8
commit 89e3c582b5
+2
View File
@@ -24,9 +24,11 @@ ok !$menu->legal_choice('Choice 3'), 'Third choice not legal';
is_deeply $menu->choice(2), undef, 'Third choice undefined';
like $menu->toDeclaration, qr/ ^
\s* \# \s* ifndef \s+ test_NUM_CHOICES \s* \n
\s* typedef \s+ enum \s+ \{ \s* \n
\s* ch1 \s+ \/\* [^*]* \*\/, \s* \n
\s* ch2 \s+ \/\* [^*]* \*\/ \s* \n
\s* \} \s* test \s* ; \s* \n
\s* \# \s* define \s+ test_NUM_CHOICES \s+ 2 \s* \n
\s* \# \s* endif \s* \n
\s* $ /x, 'C declaration';