From 26d7264717b174ea2bc273a3924b838278ecb649 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 15 Feb 2016 14:33:51 +0100 Subject: [PATCH] org: fix two links Fixes #150. * doc/org/tut.org: Fix links to notebooks. * tests/sanity/ipynb.pl: Catch this type of errors in the future. --- doc/org/tut.org | 4 ++-- tests/sanity/ipynb.pl | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/org/tut.org b/doc/org/tut.org index 9fdf9336a..457fc1f4e 100644 --- a/doc/org/tut.org +++ b/doc/org/tut.org @@ -63,6 +63,6 @@ real notebooks instead. automaton - [[https://spot.lrde.epita.fr/ipynb/ltsmin.html][=ltsmin.ipynb=]] minimal test for loading a DiVinE model using the LTSmin interface. -- [[https://spot.lrde.epita.fr/ipynb/ltsmin.html][=word.ipynb=]] example for the =twa_run= and =twa_word= classes. -- [[https://spot.lrde.epita.fr/ipynb/ltsmin.html][=highlighting.ipynb=]] shows how to highlight states or edges in +- [[https://spot.lrde.epita.fr/ipynb/word.html][=word.ipynb=]] example for the =twa_run= and =twa_word= classes. +- [[https://spot.lrde.epita.fr/ipynb/highlighting.html][=highlighting.ipynb=]] shows how to highlight states or edges in automata. diff --git a/tests/sanity/ipynb.pl b/tests/sanity/ipynb.pl index ab9f74f90..a0709c4cc 100755 --- a/tests/sanity/ipynb.pl +++ b/tests/sanity/ipynb.pl @@ -44,13 +44,18 @@ my $exit_status = 0; my %seen; while () { - if (m:\]\[=([\w-]+\.ipynb)=\]\]:) + if (m:/([\w-]+)\.html\]\[=([\w-]+\.ipynb)=\]\]:) { # print "$1 documented"; - $seen{$1} = 1; - unless (-f "$dir/$1") + $seen{$2} = 1; + unless (-f "$dir/$2") { - print STDERR "notebook $1 mentioned in tut.org does not exist"; + print STDERR "notebook $2 mentioned in tut.org does not exist"; + $exit_status = 1; + } + if ("$1.ipynb" ne "$2") + { + print STDERR "in tut.org, notebook $2 links to $1.html"; $exit_status = 1; } }