Version bump
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ android {
|
|||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 10
|
versionCode 10
|
||||||
versionName "1.3.0"
|
versionName "1.2.5"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:versionCode="10"
|
android:versionCode="10"
|
||||||
android:versionName="1.3.0">
|
android:versionName="1.2.5">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|||||||
@@ -508,9 +508,14 @@ fun FileTransferDialog(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TSO Send Options
|
// TSO / CMS Allocation & Record Format Options
|
||||||
if (!isReceive && hostType == FTConfig.HostType.TSO) {
|
if (!isReceive && (hostType == FTConfig.HostType.TSO || hostType == FTConfig.HostType.CMS)) {
|
||||||
Text("TSO Dataset Allocation:", fontSize = 12.sp, fontWeight = FontWeight.Bold, color = Color.Gray)
|
Text(
|
||||||
|
if (hostType == FTConfig.HostType.TSO) "TSO Dataset Allocation:" else "VM/CMS File Format:",
|
||||||
|
fontSize = 12.sp,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
color = Color.Gray
|
||||||
|
)
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
@@ -542,9 +547,12 @@ fun FileTransferDialog(
|
|||||||
onValueChange = { lreclStr = it.filter { c -> c.isDigit() } },
|
onValueChange = { lreclStr = it.filter { c -> c.isDigit() } },
|
||||||
label = { Text("LRECL", fontSize = 11.sp) },
|
label = { Text("LRECL", fontSize = 11.sp) },
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
keyboardOptions = TerminalKeyboardOptions.copy(imeAction = ImeAction.Next),
|
keyboardOptions = TerminalKeyboardOptions.copy(
|
||||||
modifier = Modifier.weight(1f)
|
imeAction = if (hostType == FTConfig.HostType.TSO) ImeAction.Next else ImeAction.Done
|
||||||
|
),
|
||||||
|
modifier = if (hostType == FTConfig.HostType.TSO) Modifier.weight(1f) else Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
|
if (hostType == FTConfig.HostType.TSO) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = blksizeStr,
|
value = blksizeStr,
|
||||||
onValueChange = { blksizeStr = it.filter { c -> c.isDigit() } },
|
onValueChange = { blksizeStr = it.filter { c -> c.isDigit() } },
|
||||||
@@ -554,7 +562,9 @@ fun FileTransferDialog(
|
|||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hostType == FTConfig.HostType.TSO) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
@@ -602,6 +612,7 @@ fun FileTransferDialog(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CMS Options
|
// CMS Options
|
||||||
if (hostType == FTConfig.HostType.CMS) {
|
if (hostType == FTConfig.HostType.CMS) {
|
||||||
@@ -637,14 +648,18 @@ fun FileTransferDialog(
|
|||||||
setTransferMode(if (isAscii) FTConfig.TransferMode.ASCII else FTConfig.TransferMode.BINARY)
|
setTransferMode(if (isAscii) FTConfig.TransferMode.ASCII else FTConfig.TransferMode.BINARY)
|
||||||
setHostType(hostType)
|
setHostType(hostType)
|
||||||
setExistAction(if (overwrite) FTConfig.ExistAction.REPLACE else FTConfig.ExistAction.KEEP)
|
setExistAction(if (overwrite) FTConfig.ExistAction.REPLACE else FTConfig.ExistAction.KEEP)
|
||||||
if (!isReceive && hostType == FTConfig.HostType.TSO) {
|
if (!isReceive) {
|
||||||
|
if (hostType == FTConfig.HostType.TSO || hostType == FTConfig.HostType.CMS) {
|
||||||
setRecfm(recfm)
|
setRecfm(recfm)
|
||||||
lreclStr.trim().toIntOrNull()?.let { setLrecl(it) }
|
lreclStr.trim().toIntOrNull()?.let { setLrecl(it) }
|
||||||
|
}
|
||||||
|
if (hostType == FTConfig.HostType.TSO) {
|
||||||
blksizeStr.trim().toIntOrNull()?.let { setBlksize(it) }
|
blksizeStr.trim().toIntOrNull()?.let { setBlksize(it) }
|
||||||
setUnits(units)
|
setUnits(units)
|
||||||
if (spaceStr.isNotBlank()) setSpace(spaceStr.trim())
|
if (spaceStr.isNotBlank()) setSpace(spaceStr.trim())
|
||||||
if (dirBlocks.isNotBlank()) setDirectoryBlocks(dirBlocks.trim())
|
if (dirBlocks.isNotBlank()) setDirectoryBlocks(dirBlocks.trim())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (hostType == FTConfig.HostType.CMS && cmsOptions.isNotBlank()) {
|
if (hostType == FTConfig.HostType.CMS && cmsOptions.isNotBlank()) {
|
||||||
setOptions(cmsOptions.trim())
|
setOptions(cmsOptions.trim())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,6 +229,25 @@ class ConnectionAndHostDirectoryTest {
|
|||||||
assertEquals(FTConfig.HostType.CMS, state.hostType)
|
assertEquals(FTConfig.HostType.CMS, state.hostType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testCmsFileTransferCommandGeneration() {
|
||||||
|
val cfg = FTConfig().apply {
|
||||||
|
setHostFilename("PROFILE EXEC A")
|
||||||
|
setLocalFilename("/tmp/profile.exec")
|
||||||
|
setDirection(FTConfig.Direction.SEND)
|
||||||
|
setTransferMode(FTConfig.TransferMode.ASCII)
|
||||||
|
setHostType(FTConfig.HostType.CMS)
|
||||||
|
setExistAction(FTConfig.ExistAction.REPLACE)
|
||||||
|
setRecfm(FTConfig.RecordFormat.FIXED)
|
||||||
|
setLrecl(80)
|
||||||
|
}
|
||||||
|
val cmd = cfg.buildCommand()
|
||||||
|
assertTrue("CMS command must contain RECFM F", cmd.contains("RECFM F"))
|
||||||
|
assertTrue("CMS command must contain LRECL 80", cmd.contains("LRECL 80"))
|
||||||
|
assertFalse("CMS command must not contain REPLACE keyword", cmd.contains("REPLACE"))
|
||||||
|
assertFalse("CMS command must not contain BLOCK keyword", cmd.contains("BLOCK"))
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testConnectChoiceEnum() {
|
fun testConnectChoiceEnum() {
|
||||||
val choices = ConnectChoice.values()
|
val choices = ConnectChoice.values()
|
||||||
|
|||||||
Reference in New Issue
Block a user