[cig-commits] [commit] master: Backslash-endlines should actually only end in one backslash. Take a tmp file out of the tests. Add a second, more elaborate test. (76d4275)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon May 19 19:49:54 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/b8d32926df61ef98792460aa9527d22d182355c0...76d4275352ef2cae5de9a073acd1c03a92c2670c
>---------------------------------------------------------------
commit 76d4275352ef2cae5de9a073acd1c03a92c2670c
Author: Wolfgang Bangerth <bangerth at math.tamu.edu>
Date: Mon May 19 21:45:54 2014 -0500
Backslash-endlines should actually only end in one backslash. Take a tmp file out of the tests. Add a second, more elaborate test.
>---------------------------------------------------------------
76d4275352ef2cae5de9a073acd1c03a92c2670c
source/main.cc | 2 +-
tests/prmbackslash-2.prm | 168 +++++++++++++++++++++++
tests/{sol_cx_2 => prmbackslash-2}/screen-output | 0
tests/{sol_cx_2 => prmbackslash-2}/statistics | 0
tests/prmbackslash.prm | 14 +-
5 files changed, 176 insertions(+), 8 deletions(-)
diff --git a/source/main.cc b/source/main.cc
index f1df284..97f19aa 100644
--- a/source/main.cc
+++ b/source/main.cc
@@ -184,7 +184,7 @@ expand_backslashes (const std::string &filename)
// just concatenated
if ((line.size() > 0) && (line[line.size()-1] == '\\'))
{
- result += line.substr(0, line.size()-2);
+ result += line.substr(0, line.size()-1);
++need_empty_lines;
}
else
diff --git a/tests/prmbackslash-2.prm b/tests/prmbackslash-2.prm
new file mode 100644
index 0000000..7e99410
--- /dev/null
+++ b/tests/prmbackslash-2.prm
@@ -0,0 +1,168 @@
+# Based on the sol_c\
+x_2.prm test input, split\
+ every input file after 20
+# characters with a \
+backslash. In some cases,\
+ split it more than once.
+# The output should \
+still be the same.
+
+
+set Dimension = 2
+
+set CFL number \
+ = \
+1.0
+set End time \
+ = \
+0
+
+
+set Resume computati\
+on = \
+false
+set Start time \
+ = \
+0
+set Adiabatic surfac\
+e temperature = \
+0
+set Surface pressure\
+ = \
+0
+set Use years in out\
+put instead of seconds = \
+false # default: true
+set Nonlinear solver\
+ scheme = \
+IMPES
+
+subsection Boundary \
+temperature model
+ set Model name = b\
+ox
+end
+
+
+subsection Discretiz\
+ation
+ set Stokes velocit\
+y polynomial degree \
+ = 2
+ set Temperature po\
+lynomial degree \
+ = 2
+ set Use locally co\
+nservative discretization\
+ = false
+ subsection Stabili\
+zation parameters
+ set alpha = 2
+ set beta = 0.07\
+8
+ set cR = 0.5 \
+ # default: 0.11
+ end
+end
+
+
+subsection Geometry \
+model
+ set Model name = b\
+ox
+
+ subsection Box
+ set X extent = 1\
+
+ set Y extent = 1\
+
+ set Z extent = 1\
+
+ end
+end
+
+
+subsection Gravity m\
+odel
+ set Model name = v\
+ertical
+end
+
+
+subsection Initial c\
+onditions
+ set Model name = p\
+erturbed box
+end
+
+
+subsection Material \
+model
+ set Model name = S\
+olCx
+end
+
+
+subsection Mesh refi\
+nement
+ set Initial adapti\
+ve refinement = 0 \
+ # default: 2
+ set Initial global\
+ refinement = 2 \
+ # default: 2
+
+ set Strategy \
+ = de\
+nsity, temperature
+end
+
+
+subsection Model set\
+tings
+ set Include adiaba\
+tic heating \
+ = false
+ set Include shear \
+heating \
+ = false # default: true
+
+ set Fixed temperat\
+ure boundary indicators \
+ = 0, 1
+ set Prescribed vel\
+ocity boundary indicators\
+ =
+ set Tangential vel\
+ocity boundary indicators\
+ = 0,1,2,3
+ set Zero velocity \
+boundary indicators \
+ =
+end
+
+
+subsection Postproce\
+ss
+ set List of postpr\
+ocessors = DuretzEtAl err\
+or
+ subsection Depth a\
+verage
+ set Time between\
+ graphical output = 1e8
+ end
+
+ subsection Visuali\
+zation
+ set Number of gr\
+ouped files = 0
+ set Output forma\
+t = gnupl\
+ot
+ set Time between\
+ graphical output = 0 #\
+ default: 1e8
+ end
+end
+
diff --git a/tests/sol_cx_2/screen-output b/tests/prmbackslash-2/screen-output
similarity index 100%
copy from tests/sol_cx_2/screen-output
copy to tests/prmbackslash-2/screen-output
diff --git a/tests/sol_cx_2/statistics b/tests/prmbackslash-2/statistics
similarity index 100%
copy from tests/sol_cx_2/statistics
copy to tests/prmbackslash-2/statistics
diff --git a/tests/prmbackslash.prm b/tests/prmbackslash.prm
index 4d0468a..33b3e87 100644
--- a/tests/prmbackslash.prm
+++ b/tests/prmbackslash.prm
@@ -1,11 +1,11 @@
-# a test that tests \\
+# a test that tests \
#
-\\
+\
set Dimension = 2
set CFL number = 1.0
-set End \\
-time = \\
+set End \
+time = \
1e7
set Start time = 0
set Adiabatic surface temperature = 0
@@ -18,8 +18,8 @@ subsection Boundary temperature model
set Model name = box
end
-# \\ test
-# \\
+# \ test
+# \
bla
@@ -28,7 +28,7 @@ subsection Gravity model
end
-subsection Geometry \\
+subsection Geometry \
model
set Model name = box
More information about the CIG-COMMITS
mailing list