All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.Samples.kt Maven / Gradle / Ivy

There is a newer version: 0.0.88
Show newest version
@file:Suppress("unused")

package pl.mareklangiewicz.kommand.samples

import pl.mareklangiewicz.annotations.DelicateApi
import pl.mareklangiewicz.annotations.ExampleApi
import pl.mareklangiewicz.kommand.*


data class Sample(
  val kommand: Kommand,
  val expectedLineRaw: String? = null,
) : Kommand by kommand

data class TypedSample(
  val typedKommand: TypedKommand,
  val expectedLineRaw: String? = null,
)

data class ReducedSample(
  val reducedKommand: ReducedKommand,
  val expectedLineRaw: String? = null,
) : ReducedKommand by reducedKommand

internal infix fun Kommand.s(expectedLineRaw: String?) = Sample(this, expectedLineRaw = expectedLineRaw)

internal infix fun  TypedKommand.ts(expectedLineRaw: String?) =
  TypedSample(this, expectedLineRaw = expectedLineRaw)

internal infix fun  ReducedKommand.rs(expectedLineRaw: String?) =
  ReducedSample(this, expectedLineRaw = expectedLineRaw)


@OptIn(DelicateApi::class)
data object Samples {
  @ExampleApi val Demo = pl.mareklangiewicz.kommand.demo.MyDemoSamples
  val Core = pl.mareklangiewicz.kommand.core.CoreSamples
  val Find = pl.mareklangiewicz.kommand.find.FindSamples
  val Ssh = pl.mareklangiewicz.kommand.ssh.SshSamples
  val Admin = pl.mareklangiewicz.kommand.admin.AdminSamples
  val VimBasic = pl.mareklangiewicz.kommand.vim.VimBasicSamples
  val VimAdvanced = pl.mareklangiewicz.kommand.vim.VimAdvancedSamples
  val Debian = pl.mareklangiewicz.kommand.debian.DebianSamples
  val Git = pl.mareklangiewicz.kommand.git.GitSamples
  val GitHub = pl.mareklangiewicz.kommand.github.GhSamples
  val Gnome = pl.mareklangiewicz.kommand.gnome.GnomeSamples
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy