Skip to content

Commit

Permalink
Merge pull request #233 from skycaptain/fix-231
Browse files Browse the repository at this point in the history
Fixed #231
  • Loading branch information
cbm755 authored Sep 30, 2019
2 parents 5141f79 + 63c7d9f commit 008e6ec
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ This can be useful as part of a testing framework or simply to ensure that docum
To get started, here is a simple example:

~~~matlab
function greeting = greet(user)
function greet(user)
% Returns a greeting.
%
% >> greet World
%
% Hello, World!
greeting = ['Hello, ' user '!'];
disp(['Hello, ' user '!']);
end
~~~
Expand Down
2 changes: 1 addition & 1 deletion inst/doctest.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
%%
%% @example
%% @group
%% >> datestr(now, 'yyyy-mm-dd')
%% >> disp(datestr(now, 'yyyy-mm-dd'))
%% 2...
%% @end group
%% @end example
Expand Down
4 changes: 2 additions & 2 deletions test/@test_class/test_class.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function obj = test_class
%
% >> class(test_class)
% ans = test_class
% >> disp(class(test_class))
% test_class
%
%
% >> methods test_class
Expand Down
4 changes: 2 additions & 2 deletions test/@test_class/test_method.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function result = test_method(obj, varargin)
%
% >> m = test_class; test_method(m)
% ans = Default Name is 42 years old.
% >> m = test_class; disp(test_method(m))
% Default Name is 42 years old.

result = sprintf('%s is %d years old.', obj.name, obj.age);

Expand Down
4 changes: 2 additions & 2 deletions test/examples/greet.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function greeting = greet(user)
function greet(user)
% Returns a greeting.
%
% >> greet World
%
% Hello, World!

greeting = ['Hello, ' user '!'];
disp(['Hello, ' user '!']);

end
4 changes: 1 addition & 3 deletions test/test_compare_backspace.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ function test_compare_backspace()
% >> if (exist('OCTAVE_VERSION'))
% .. eval('sprintf("Hi, no question mark here?\x08 goodbye")')
% .. else
% .. sprintf('Hi, no question mark here?\x08 goodbye')
% .. disp(sprintf('Hi, no question mark here?\x08 goodbye'))
% .. end
%
% ans =
%
% Hi, no question mark here goodbye
%
%
Expand Down
2 changes: 1 addition & 1 deletion test/test_ellipsis.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function test_ellipsis()
% >> '...' % doctest: -ELLIPSIS
% >> disp('...') % doctest: -ELLIPSIS
%
% ...
%
Expand Down

0 comments on commit 008e6ec

Please sign in to comment.