Skip to content

Commit

Permalink
Add test for #290
Browse files Browse the repository at this point in the history
  • Loading branch information
florianschanda committed Aug 15, 2024
1 parent 4dd9227 commit 267d666
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/style/bug_290/expected_out.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="file:../../../docs/style.css">
<title>MISS_HIT Report</title>
</head>
<body>
<header>MISS_HIT Report</header>
<main>
<div></div>
<h1>Issues identified</h1>
<section>
<h2>test.m</h2>
<div class="message"><a href="matlab:opentoline('test.m', 3, 5)">test.m: line 3:</a> error: expected valid statement, found keyword &#x27;arguments&#x27; instead</div>
<div class="message"><a href="matlab:opentoline('test.m', 3, 24)">test.m: line 3:</a> style: continuation must be preceeded by whitespace</div>
<div class="message"><a href="matlab:opentoline('test.m', 4, 20)">test.m: line 4:</a> style: continuation must be preceeded by whitespace</div>
</section>
</main>
</body>
</html>
15 changes: 15 additions & 0 deletions tests/style/bug_290/expected_out.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
=== PLAIN MODE ===
test.m: error: file is not auto-fixed because it contains parse errors
In test.m, line 3
| arguments = struct(...
| ^^^^^^^^^ error: expected valid statement, found keyword 'arguments' instead
In test.m, line 3
| arguments = struct(...
| ^^^^ style: continuation must be preceeded by whitespace [whitespace_continuation]
In test.m, line 4
| 'test', 1.0...
| ^^^^ style: continuation must be preceeded by whitespace [whitespace_continuation]
MISS_HIT Style Summary: 1 file(s) analysed, 2 style issue(s), 2 error(s)

=== HTML MODE ===
MISS_HIT Style Summary: 1 file(s) analysed, 2 style issue(s), 1 error(s)
6 changes: 6 additions & 0 deletions tests/style/bug_290/test.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function [] = test()
a = 0;
arguments = struct(...
'test', 1.0...
);
end
6 changes: 6 additions & 0 deletions tests/style/bug_290/test.m_fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function [] = test()
a = 0;
arguments = struct(...
'test', 1.0...
);
end

0 comments on commit 267d666

Please sign in to comment.