Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Commit

Permalink
Fix the failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rekire committed May 13, 2019
1 parent ba545b7 commit b0fb100
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 26 deletions.
8 changes: 4 additions & 4 deletions cli/src/main/kotlin/org/rewedigital/konversation/Cli.kt
Expand Up @@ -61,17 +61,17 @@ open class Cli {
L.error("Target is missing")
exit(-1)
}
"--export-dialogflow" -> if (++argNo <= args.size) {
"--export-dialogflow" -> if (++argNo < args.size) {
dialogflowDir = File(args[argNo]).absoluteFile
} else {
L.error("Target is missing")
exit(-1)
}
"invocation",
"-invocation" -> if (++argNo <= args.size) {
"-invocation" -> if (++argNo < args.size) {
invocationName = args[argNo]
}
"--export-kson" -> if (++argNo <= args.size) {
"--export-kson" -> if (++argNo < args.size) {
ksonDir = File(args[argNo])
} else {
L.error("Target directory is missing")
Expand All @@ -82,7 +82,7 @@ open class Cli {
"limit",
"-limit",
"top",
"-top" -> if (++argNo <= args.size) {
"-top" -> if (++argNo < args.size) {
try {
limit = args[argNo].toInt()
} catch (e: Throwable) {
Expand Down
24 changes: 13 additions & 11 deletions cli/src/test/kotlin/org/rewedigital/konversation/CliTest.kt
Expand Up @@ -250,16 +250,18 @@ class CliTest {
val rootPath = if (File("").absolutePath.endsWith("cli")) "" else "cli/"
val pathPrefix = "${rootPath}src/test/resources"
val helpOutput = """Arguments for konversation:
[-help] Print this help
[-count] Count the permutations and print this to the console
[-stats] Print out some statistics while generation
[-cache] Cache everything even if an utterance has just a single permutation
[--export-alexa <OUTFILE>] Write the resulting json to OUTFILE instead of result.json
[-invocation <NAME>] Define the invocation name for the Alexa export
[-limit <COUNT>] While pretty printing the json to the output file limit the utterances count per intent
[--export-kson <OUTDIR>] Compiles the kvs file to kson resource files which are required for the runtime
[-dump] Dump out all intents to its own txt file
[-prettyprint] Generate a well formatted json for easier debugging
<FILE> The grammar or kvs file to parse"""
[-help] Print this help
[-version] Print the version of this build
[-count] Count the permutations and print this to the console
[-stats] Print out some statistics while generation
[-cache] Cache everything even if an utterance has just a single permutation
[--export-alexa <OUTFILE>] Write the resulting json to OUTFILE instead of result.json
[--export-dialogflow <OUTDIR>] Write the dialogflow zip file to the OUTDIR
[-invocation <NAME>] Define the invocation name for the Alexa export
[-limit <COUNT>] While pretty printing the json to the output file limit the utterances count per intent
[--export-kson <OUTDIR>] Compiles the kvs file to kson resource files which are required for the runtime
[-dump] Dump out all intents to its own txt file
[-prettyprint] Generate a well formatted json for easier debugging
<FILE> The grammar, kvs or values files to parse"""
}
}
Expand Up @@ -45,24 +45,21 @@ class EntityTest {
"synonyms": [
"master"
]
}
""")
}""")
val oneSynonym = Result("{\"value\":\"master\",\"synonyms\":[\"master\",\"synonym1\"]}", """ {
"value": "master",
"synonyms": [
"master",
"synonym1"
]
}
""")
}""")
val twoSynonyms = Result("{\"value\":\"master\",\"synonyms\":[\"master\",\"synonym1\",\"synonym2\"]}", """ {
"value": "master",
"synonyms": [
"master",
"synonym1",
"synonym2"
]
}
""")
}""")
}
}
Expand Up @@ -28,11 +28,6 @@
"018",
"019"
]
},
{
"name": "Foo",
"slots": [],
"samples": []
}
],
"types": []
Expand Down

0 comments on commit b0fb100

Please sign in to comment.