From 97f4b5c54972a8f09618c8cfd6ba69e43d0f13da Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Tue, 26 Jan 2016 09:50:57 +0100 Subject: [PATCH] Update suitable examples and tests to use blank mode --- doc/parts/state-types/containers.sxml | 4 ++-- doc/parts/types/graphs.sxml | 4 ++-- examples/doc/{graph-state.shape => graph-state.blank} | 3 --- examples/doc/{graph-walk.shape => graph-walk.blank} | 3 --- examples/features/{fgraphs.shape => fgraphs.blank} | 2 -- examples/features/{lists.shape => lists.blank} | 2 -- examples/misc/{self.shape => self.blank} | 2 -- examples/problems/{choose.shape => choose.blank} | 0 examples/problems/{graph-types.shape => graph-types.blank} | 0 .../{hierarchical-graphs.shape => hierarchical-graphs.blank} | 0 test/text/Makefile.am | 12 ++++++------ test/text/{bad.shape => bad.blank} | 0 test/text/{dynamic.shape => dynamic.blank} | 3 --- test/text/{scopes.shape => scopes.blank} | 3 --- test/text/{sort.shape => sort.blank} | 3 --- 15 files changed, 10 insertions(+), 31 deletions(-) rename examples/doc/{graph-state.shape => graph-state.blank} (96%) rename examples/doc/{graph-walk.shape => graph-walk.blank} (97%) rename examples/features/{fgraphs.shape => fgraphs.blank} (99%) rename examples/features/{lists.shape => lists.blank} (99%) rename examples/misc/{self.shape => self.blank} (97%) rename examples/problems/{choose.shape => choose.blank} (100%) rename examples/problems/{graph-types.shape => graph-types.blank} (100%) rename examples/problems/{hierarchical-graphs.shape => hierarchical-graphs.blank} (100%) rename test/text/{bad.shape => bad.blank} (100%) rename test/text/{dynamic.shape => dynamic.blank} (93%) rename test/text/{scopes.shape => scopes.blank} (95%) rename test/text/{sort.shape => sort.blank} (99%) diff --git a/doc/parts/state-types/containers.sxml b/doc/parts/state-types/containers.sxml index b27c23e8..b8eec633 100644 --- a/doc/parts/state-types/containers.sxml +++ b/doc/parts/state-types/containers.sxml @@ -581,8 +581,8 @@ will not remove the stroke from the page, since the value being tacked

A state is always initialized using an existing value. In particular, the graph domain of the state is that of the value. This is illustrated with a short example.

- -]]> + +]]> ]]> diff --git a/doc/parts/types/graphs.sxml b/doc/parts/types/graphs.sxml index 669987c6..45709f1f 100644 --- a/doc/parts/types/graphs.sxml +++ b/doc/parts/types/graphs.sxml @@ -1760,8 +1760,8 @@

A is the representation of a traversal of a graph along its edges. In general, nodes and edges may be visited zero or more times along the walk, but by placing constraints on the properties of the walk, one obtains more specialized types of walks, such as trails or Eulerian cycles.

- -]]> + +]]> ]]> diff --git a/examples/doc/graph-state.shape b/examples/doc/graph-state.blank similarity index 96% rename from examples/doc/graph-state.shape rename to examples/doc/graph-state.blank index d1b157be..35479843 100644 --- a/examples/doc/graph-state.shape +++ b/examples/doc/graph-state.blank @@ -46,6 +46,3 @@ IO..•stdout << `Edges in g1: ´ << [seq_sep_string g1.edges] << "{n} g2: ( g1 << >>.[node 'd] << >>.[edge 'c 'd] ) IO..•stdout << `Edges in g2: ´ << [seq_sep_string g2.edges] << "{n} - -/** Prevent empty output error. **/ -Graphics..@spot diff --git a/examples/doc/graph-walk.shape b/examples/doc/graph-walk.blank similarity index 97% rename from examples/doc/graph-walk.shape rename to examples/doc/graph-walk.blank index 23959201..dd29eb3a 100644 --- a/examples/doc/graph-walk.shape +++ b/examples/doc/graph-walk.blank @@ -66,6 +66,3 @@ ignore [] [w.edges.foldsl IO..•stdout ] IO..•stdout << "{n} - -/** Prevent empty output error. **/ -Graphics..@spot diff --git a/examples/features/fgraphs.shape b/examples/features/fgraphs.blank similarity index 99% rename from examples/features/fgraphs.shape rename to examples/features/fgraphs.blank index ceab9bbc..69fefc66 100644 --- a/examples/features/fgraphs.shape +++ b/examples/features/fgraphs.blank @@ -53,5 +53,3 @@ traverse: \ node depth → ] IO..•stdout << [traverse [g '0] '7] << "{n} - -Graphics..@spot diff --git a/examples/features/lists.shape b/examples/features/lists.blank similarity index 99% rename from examples/features/lists.shape rename to examples/features/lists.blank index f4ed3805..9efe57e8 100644 --- a/examples/features/lists.shape +++ b/examples/features/lists.blank @@ -33,5 +33,3 @@ opl: \ p e → p + (String..newString << e) IO..•stdout << [lst1.foldl opl `0´] << ` ´ << [lst2.foldl opl `0´] << ` ´ << [lst3.foldl opl `0´] << ` ´ << [lst4.foldl opl `0´] << ` ´ << [lst5.foldl opl `0´] << ` ´ << [lst6.foldl opl `0´] << "{n} opr: \ e p → (String..newString << e) + p IO..•stdout << [lst1.foldr opr `4´] << ` ´ << [lst2.foldr opr `4´] << ` ´ << [lst3.foldr opr `4´] << ` ´ << [lst4.foldr opr `4´] << ` ´ << [lst5.foldr opr `4´] << ` ´ << [lst6.foldr opr `4´] << "{n} - -Graphics..@spot diff --git a/examples/misc/self.shape b/examples/misc/self.blank similarity index 97% rename from examples/misc/self.shape rename to examples/misc/self.blank index a16889ff..f5aba6f6 100644 --- a/examples/misc/self.shape +++ b/examples/misc/self.blank @@ -32,5 +32,3 @@ makeObj: \ z → obj: [makeObj 3] Shapes..IO..•stdout << [obj.g 2] << "{n} - -Shapes..Graphics..@spot diff --git a/examples/problems/choose.shape b/examples/problems/choose.blank similarity index 100% rename from examples/problems/choose.shape rename to examples/problems/choose.blank diff --git a/examples/problems/graph-types.shape b/examples/problems/graph-types.blank similarity index 100% rename from examples/problems/graph-types.shape rename to examples/problems/graph-types.blank diff --git a/examples/problems/hierarchical-graphs.shape b/examples/problems/hierarchical-graphs.blank similarity index 100% rename from examples/problems/hierarchical-graphs.shape rename to examples/problems/hierarchical-graphs.blank diff --git a/test/text/Makefile.am b/test/text/Makefile.am index d0b4e19a..efe925f8 100644 --- a/test/text/Makefile.am +++ b/test/text/Makefile.am @@ -16,7 +16,7 @@ # Copyright 2008, 2013 Gustaf Hendeby, Henrik Tidefelt # === How to setup a new test === -# Just add your .shape file and a corresponding .correct file, and add +# Just add your .blank file and a corresponding .correct file, and add # the test to the TESTS variable below. The .correct file should be # the output expected on stdout, like this: # %.correct : %.out @@ -36,18 +36,18 @@ SHAPESFLAGS = --warn=error --resources=no \ --tmpdir "/tmp/shapes.${USER}" --tmp*=yes \ --needpath ${top_srcdir}/resources/extensions -TEST_BASE = $(notdir $(basename $(wildcard ${srcdir}/*.shape))) +TEST_BASE = $(notdir $(basename $(wildcard ${srcdir}/*.blank))) # TESTS needs to be a literal listing of tests, make sure it agrees with # test-list.test ${addprefix test_, ${TEST_BASE}} # You can get the ${...} part in a terminal as -# ls *.shape | sed -e 's/\(.*\)\.shape/test_\1/' | tr '\n' ' ' +# ls *.blank | sed -e 's/\(.*\)\.blank/test_\1/' | tr '\n' ' ' TESTS = test-list.test \ test_bad test_dynamic test_scopes test_sort check_DATA = ${addsuffix .out, ${TEST_BASE}} test-list.out dist_check_DATA = testTEMPLATE \ - ${addsuffix .shape, ${TEST_BASE}} \ + ${addsuffix .blank, ${TEST_BASE}} \ ${addsuffix .correct, ${TEST_BASE}} \ test-list.correct CLEANFILES = ${addprefix test_, ${TEST_BASE}} \ @@ -60,7 +60,7 @@ test_% : testTEMPLATE @sed -e 's/FNAME/$*/g' < $< > $@ && \ chmod a+rx $@ -%.out : ${srcdir}/%.shape ${SHAPES} +%.out : ${srcdir}/%.blank ${SHAPES} -@$(SHAPES) ${SHAPESFLAGS} $< > $@ 2> /dev/null %.test : testTEMPLATE %.correct @@ -71,4 +71,4 @@ test-list.correct : Makefile echo ${TESTS} | sed -e 's/test-list.test\( \)\{0,\}//g' | tr -s ' ' '\n' | sort > $@ test-list.out : - (cd ${srcdir}; ls *.shape) | sed -e 's/\(.*\)\.shape/test_\1/' | sort > $@ + (cd ${srcdir}; ls *.blank) | sed -e 's/\(.*\)\.blank/test_\1/' | sort > $@ diff --git a/test/text/bad.shape b/test/text/bad.blank similarity index 100% rename from test/text/bad.shape rename to test/text/bad.blank diff --git a/test/text/dynamic.shape b/test/text/dynamic.blank similarity index 93% rename from test/text/dynamic.shape rename to test/text/dynamic.blank index 0de51d3e..949ac0e2 100644 --- a/test/text/dynamic.shape +++ b/test/text/dynamic.blank @@ -7,6 +7,3 @@ IO..•stdout << @a << "{n} dynamic @b identity [error `Dynamic variable has no default binding.´] IO..•stdout << @b:(4+3) | @b << ` No error see?´ << "{n} - - -Graphics..@spot diff --git a/test/text/scopes.shape b/test/text/scopes.blank similarity index 95% rename from test/text/scopes.shape rename to test/text/scopes.blank index 16302b38..74d6c103 100644 --- a/test/text/scopes.shape +++ b/test/text/scopes.blank @@ -17,6 +17,3 @@ a: 1 IO..•stdout ≪ `Is 0 odd? --> ´ ≪ [odd 0] ≪ "{n} IO..•stdout ≪ `Is 4 even? --> ´ ≪ [even 4] ≪ "{n} } - - -Graphics..@spot diff --git a/test/text/sort.shape b/test/text/sort.blank similarity index 99% rename from test/text/sort.shape rename to test/text/sort.blank index 2cca39a7..7937e6e5 100644 --- a/test/text/sort.shape +++ b/test/text/sort.blank @@ -86,6 +86,3 @@ seqLess: \ seq1 seq2 → **/ valuesSorted: [sort values seqLess] IO..•stdout << [seq_string [separate "{n} [fmap seqInputForm valuesSorted]]] << "{n} - - -Graphics..@spot -- 2.11.4.GIT