?login_element?

Subversion Repositories NedoOS

Rev

Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download

  1.     lua
  2.         _pc("OPT reset")
  3.         sj.warning("[pass default] warning emitted from lua")
  4.         _pc("OPT --syntax=w")   ; -- treat warnings as errors
  5.         sj.warning("[pass default] second warning emitted from lua")
  6.     endlua
  7.  
  8.     lua pass1
  9.         _pc("OPT reset")
  10.         sj.warning("[pass 1] warning emitted from lua")
  11.         _pc("OPT --syntax=w")   ; -- treat warnings as errors
  12.         sj.warning("[pass 1] second warning emitted from lua")
  13.     endlua
  14.  
  15.     lua pass2
  16.         _pc("OPT reset")
  17.         sj.warning("[pass 2] warning emitted from lua")
  18.         _pc("OPT --syntax=w")   ; -- treat warnings as errors
  19.         sj.warning("[pass 2] second warning emitted from lua")
  20.     endlua
  21.  
  22.     lua pass3
  23.         _pc("OPT reset")
  24.         sj.warning("[pass 3] warning emitted from lua")
  25.         _pc("OPT --syntax=w")   ; -- treat warnings as errors
  26.         sj.warning("[pass 3] second warning emitted from lua")
  27.     endlua
  28.  
  29.     lua allpass
  30.         _pc("OPT reset")
  31.         sj.warning("[pass all] warning emitted from lua")
  32.         _pc("OPT --syntax=w")   ; -- treat warnings as errors
  33.         sj.warning("[pass all] second warning emitted from lua")
  34.     endlua
  35.  
  36.     lua pass3 ; "bad value" argument (also number works)
  37.         _pc("OPT reset")
  38.         sj.warning("[bad value]", 2)
  39.         _pc("OPT --syntax=w")   ; -- treat warnings as errors
  40.         sj.warning("[bad value]", 2)
  41.     endlua
  42.  
  43.     lua allpass
  44.         sj.add_word(sj.error_count)     -- ; should be 0x0008
  45.         sj.add_byte(sj.warning_count)   -- ; should be 0x08
  46.         sj.add_byte(0)
  47.         _pl("")         -- ; force emitted bytes in listing as silent/external
  48.     endlua
  49.     ; expected four bytes: 08 00 08 00
  50.