Preserve line breaks from continued line comments

The commit "Preserve line breaks in comments before test functions"
only handled block comments. This commit handles line comments.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/scripts/generate_test_code.py b/tests/scripts/generate_test_code.py
index b7c8e28..f19d30b 100755
--- a/tests/scripts/generate_test_code.py
+++ b/tests/scripts/generate_test_code.py
@@ -537,11 +537,15 @@
             break
         if line[opening.start(0) + 1] == '/': # //...
             continuation = line
+            # Count the number of line breaks, to keep line numbers aligned
+            # in the output.
+            line_count = 1
             while continuation.endswith('\\\n'):
                 # This errors out if the file ends with an unfinished line
                 # comment. That's acceptable to not complicate the code further.
                 continuation = next(stream)
-            return line[:opening.start(0)].rstrip() + '\n'
+                line_count += 1
+            return line[:opening.start(0)].rstrip() + '\n' * line_count
         # Parsing /*...*/, looking for the end
         closing = line.find('*/', opening.end(0))
         while closing == -1:
diff --git a/tests/scripts/test_generate_test_code.py b/tests/scripts/test_generate_test_code.py
index 8b2bf78..d23d742 100755
--- a/tests/scripts/test_generate_test_code.py
+++ b/tests/scripts/test_generate_test_code.py
@@ -767,6 +767,8 @@
 
 
 
+
+
 void test_func()
 {
     ba ba black sheep
@@ -813,6 +815,7 @@
         expected = '''#line 1 "test_suite_ut.function"
 
 void test_func( int x,
+
            int y                                 )
 {
     ba ba black sheep