Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.191.171.136
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/root/proc/self/root/proc/2/cwd/usr/share/augeas/lenses/dist/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/root/proc/self/root/proc/2/cwd/usr/share/augeas/lenses/dist/tests/test_aliases.aug
(*
Module: Test_Aliases
  Provides unit tests and examples for the <Aliases> lens.
*)

module Test_aliases =

(* Variable: file
   A full configuration file *)
  let file = "#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.

# Basic system aliases -- these MUST be present.
mailer-daemon:	postmaster
postmaster:	root

# General redirections for pseudo accounts.
bin:		root , adm,
  bob
daemon:		root
adm:		root
file:		/var/foo
pipe1:		|/bin/ls
pipe2 :		|\"/usr/bin/ls args,\"
"

(* Test: Aliases.lns
   Testing <Aliases.lns> on <file> *)
  test Aliases.lns get file =
    { }
    { "#comment" = "Aliases in this file will NOT be expanded in the header from" }
    { "#comment" = "Mail, but WILL be visible over networks or from /bin/mail." }
    {}
    { "#comment" = "Basic system aliases -- these MUST be present." }
    { "1" { "name" = "mailer-daemon" }
          { "value" = "postmaster" } }
    { "2" { "name" = "postmaster" }
          { "value" = "root" } }
    {}
    { "#comment" = "General redirections for pseudo accounts." }
    { "3" { "name" = "bin" }
          { "value" = "root" }
          { "value" = "adm" }
          { "value" = "bob" } }
    { "4" { "name" = "daemon" }
          { "value" = "root" } }
    { "5" { "name" = "adm" }
          { "value" = "root" } }
    { "6" { "name" = "file" }
          { "value" = "/var/foo" } }
    { "7" { "name" = "pipe1" }
          { "value" = "|/bin/ls" } }
    { "8" { "name" = "pipe2" }
          { "value" = "|\"/usr/bin/ls args,\"" } }

(* Test: Aliases.lns
   Put test for <Aliases.lns> on <file> *)
  test Aliases.lns put file after
    rm "/4" ; rm "/5" ; rm "/6" ; rm "/7" ; rm "/8" ;
      set "/1/value[2]" "barbar" ;
      set "/3/value[2]" "ruth"
    = "#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.

# Basic system aliases -- these MUST be present.
mailer-daemon:	postmaster, barbar
postmaster:	root

# General redirections for pseudo accounts.
bin:		root , ruth,
  bob
"

  (* Test: Aliases.lns
     Schema violation, no 3/name *)
  test Aliases.lns put file after
      rm "/3" ;
      set "/3/value/2" "ruth"
    = *

  (* Variable: nocomma
     Don't have to have whitespace after a comma *)
  let nocomma = "alias: target1,target2\n"

  (* Test: Aliases.lns
     Testing <Aliases.lns> on <nocomma> *)
  test Aliases.lns get nocomma =
    { "1"
        { "name" = "alias" }
        { "value" = "target1" }
        { "value" = "target2" } }

  (* Test: Aliases.lns
     Ticket #229: commands can be fully enclosed in quotes *)
  test Aliases.lns get "somebody: \"|exit 67\"\n" =
    { "1"
        { "name" = "somebody" }
        { "value" = "\"|exit 67\"" } }

  (* Test: Aliases.lns
     Don't have to have whitespace after the colon *)
  test Aliases.lns get "alias:target\n" =
    { "1"
        { "name" = "alias" }
        { "value" = "target" } }

(* Local Variables: *)
(* mode: caml       *)
(* End:             *)

Anon7 - 2022
AnonSec Team