👷 add test for documentation
This commit is contained in:
parent
0e25bfde65
commit
50b891e009
@ -11,13 +11,13 @@ EXAMPLES = $(wildcard examples/*.cpp)
|
|||||||
|
|
||||||
# create output from a stand-alone example file
|
# create output from a stand-alone example file
|
||||||
%.output: %.cpp
|
%.output: %.cpp
|
||||||
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
$(MAKE) $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||||
./$(<:.cpp=) > $@
|
./$(<:.cpp=) > $@
|
||||||
rm $(<:.cpp=)
|
rm $(<:.cpp=)
|
||||||
|
|
||||||
# compare created output with current output of the example files
|
# compare created output with current output of the example files
|
||||||
%.test: %.cpp
|
%.test: %.cpp
|
||||||
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
$(MAKE) $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||||
./$(<:.cpp=) > $@
|
./$(<:.cpp=) > $@
|
||||||
diff $@ $(<:.cpp=.output)
|
diff $@ $(<:.cpp=.output)
|
||||||
rm $(<:.cpp=) $@
|
rm $(<:.cpp=) $@
|
||||||
@ -29,7 +29,7 @@ create_output: $(EXAMPLES:.cpp=.output)
|
|||||||
check_output: $(EXAMPLES:.cpp=.test)
|
check_output: $(EXAMPLES:.cpp=.test)
|
||||||
|
|
||||||
# check output of all stand-alone example files (exclude meta which is dependent on the current compiler)
|
# check output of all stand-alone example files (exclude meta which is dependent on the current compiler)
|
||||||
check_output_portable: $(filter-out examples/meta.test,$(EXAMPLES:.cpp=.test))
|
check_output_portable: $(filter-out examples/meta.test examples/max_size.test examples/std_hash.test,$(EXAMPLES:.cpp=.test))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr $(EXAMPLES:.cpp=)
|
rm -fr $(EXAMPLES:.cpp=)
|
||||||
|
|||||||
@ -30,5 +30,5 @@ int main()
|
|||||||
doc.patch_inplace(patch);
|
doc.patch_inplace(patch);
|
||||||
|
|
||||||
// output patched document
|
// output patched document
|
||||||
std::cout << "After\n" << std::setw(4) << doc << std::endl;
|
std::cout << "\nAfter\n" << std::setw(4) << doc << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user