Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docx/src/test/scala/org/beangle/doc/docx/DocHelperTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (C) 2005, The Beangle Software. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.beangle.doc.docx | ||
|
||
import org.scalatest.funspec.AnyFunSpec | ||
import org.scalatest.matchers.should.Matchers | ||
|
||
class DocHelperTest extends AnyFunSpec with Matchers { | ||
val data = Map("param1" -> "value1", "param2" -> "value2") | ||
|
||
describe("DocHelper replace function") { | ||
it("replace normal") { | ||
DocHelper.replace("${param1} is fine", data) should equal("value1 is fine") | ||
} | ||
|
||
it("replace normal multiple") { | ||
DocHelper.replace("${param1} != ${param2}", data) should equal("value1 != value2") | ||
} | ||
|
||
it("replace expression with space") { | ||
DocHelper.replace("${param1 } != ${ param2}", data) should equal("value1 != value2") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
addSbtPlugin("org.beangle.parent" % "sbt-beangle-parent" % "0.8.0") | ||
addSbtPlugin("org.beangle.parent" % "sbt-beangle-parent" % "0.8.4") | ||
addSbtPlugin("org.beangle.build" % "sbt-beangle-build" % "0.0.11") | ||
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") |