Skip to content
Snippets Groups Projects
Select Git revision
  • 2016b331394b619bda36422b3a42d484b4dc169d
  • devel default
  • one-way-audio-after-hold
  • asterisk_rdkb
  • fix_transport_config
  • wenpeng-1021
  • fix_crash_at_transport
  • transport-destroy-crash_pjproject
  • fix_transports_init
  • lk_debug_dialogs
  • lk_forking_revert
  • wenpeng-jul8
  • gyang-devel
  • gyang-devel1
  • wenpeng-jul9
  • asterisk_rdkb_ipv6
  • 16916_rdkb_merge
  • lk_disable_registrar
  • wenpeng-100rel-ippbx
  • fix_multiple_dns_lookup
  • dev_fxs_no_wb
  • fix_fallback
  • 22.0.0-pre1
  • 21.4.2
  • 20.9.2
  • 18.24.2
  • certified-20.7-cert2
  • certified-18.9-cert11
  • 21.4.1
  • 20.9.1
  • 18.24.1
  • 21.4.0
  • 20.9.0
  • 18.24.0
  • certified-20.7-cert1
  • certified-18.9-cert10
  • 21.4.0-rc1
  • 20.9.0-rc1
  • 18.24.0-rc1
  • 21.3.1
  • 20.8.1
  • 18.23.1
42 results

expr2.testinput

Blame
  • user avatar
    Steve Murphy authored
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    I had some work to do to port these changes to trunk; the 
    check_expr stuff hasn't been updated here for quite some
    time, it appears. I added some more tests to the check_expr2
    suite. I had to play around with the makefile a bit, etc.
    
    I added STANDALONE2 #ifdefs to ast_expr2.y so as not to
    conflict structure with aelparse.
    
    ........
      r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines
      
      These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text.
      
      I modified and added rules in ast_expr2.fl to better handle
      the concatenations.
      
      I added some default routines to ast_expr2.y so the standalone would
      compile. It also looks like I haven't run this thru bison since 2.1, so
      it's good to get this updated.
      
      The Makefile has comments added now for check_expr2 and check_expr to
      explain what they are for, and how to run them. 
      
      The testexpr2s stuff has been removed, in favor of check_expr2.
      
      expr2.testinput has been updated to include the two expressions
      that inspired these changes (from mcnobody on #asterisk this morning)
      The regression has been run and all looks well.
    ........
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
    f47b0387
    History
    expr2.testinput 2.27 KiB
    2 + 2
          2     +       2            
    
    2 - 4
    4 - 2
    -4 - -2
    4 + 2 * 8
    (4 + 2) * 8
    4 + (2 * 8)
    4 + (2 * 8) ? 3 :: 6
    4 + 8 / 2
    4 + 8 / 3
    (4+8) / 3
    4 + 8 % 3
    4 + 9 % 3
    (4+9) %3
    (4+8) %3
    (4+9) %3
    (4+8) %3
    (4+9) % 3
    (4+8) % 3
    (4+9) % 3
    (4+8) % 3
    (4+9)% 3
    (4+8)% 3
    (4+9)% 3
    (4+8)% 3
    4 & 4
    0 & 4
    0 & 0
    2 | 0
    2 | 4
    0 | 0
    !0 | 0
    !4 | 0
    4 | !0
    !4 | !0
    3 < 4
    4 < 3
    3 > 4
    4 > 3
    3 = 3
    3 = 4
    3 != 3
    3 != 4
    3 >= 4
    3 >= 3
    4 >= 3
    3 <= 4
    4 <= 3
    4 <= 4
    3 > 4 & 4 < 3
    4 > 3 & 3 < 4
    x = x
    y = x
    x != y
    x != x
    "Something interesting" =~ interesting
    "Something interesting" =~ Something
    "Something interesting" : Something
    "Something interesting" : interesting
    "Something interesting" =~ "interesting"
    "Something interesting" =~ "Something"
    "Something interesting" : "Something"
    "Something interesting" : "interesting"
    "Something interesting" =~ (interesting)
    "Something interesting" =~ (Something)
    "Something interesting" : (Something)
    "Something interesting" : (interesting)
    "Something interesting" =~ "\(interesting\)"
    "Something interesting" =~ "\(Something\)"
    "Something interesting" : "\(Something\)"
    "Something interesting" : "\(interesting\)"
    "011043567857575" : "011\(..\)"
    "9011043567857575" : "011\(..\)"
    "011043567857575" =~ "011\(..\)"
    "9011043567857575" =~ "011\(..\)"
    "Something interesting" =~ (interesting)
    "Something interesting" =~ (Something)
    "Something interesting" : (Something)
    "Something interesting" : (interesting)
    "Something interesting" =~ "(interesting)"
    "Something interesting" =~ "(Something)"
    "Something interesting" : "(Something)"
    "Something interesting" : "(interesting)"
    "011043567857575" : "011(..)"
    "9011043567857575" : "011(..)"
    "011043567857575" =~ "011(..)"
    "9011043567857575" =~ "011(..)"
    3
    something
    043
    2.1+4.2
    1.500003+1.4999999999999898989898989898989898989889898
    1/4
    2.3 + COS(3.141592653)
    REMAINDER(13,3)
    2.3 + SIN(3.1415823)
    TAN(45) + 2.3
    POW(10.0,4.0)
    SQRT(4)
    SQRT(2)
    FLOOR(2.4)
    FLOOR(2.6)
    CEIL(2.4)
    CEIL(2.6)
    ROUND(2.4)
    ROUND(2.5)
    ROUND(2.6)
    RINT(2.4)
    RINT(2.5)
    RINT(2.6)
    TRUNC(2.4)
    TRUNC(2.5)
    TRUNC(2.6)
    EXP(1.0)
    EXP2(1.0)
    LOG(10)
    LOG2(10)
    LOG10(10)
    ATAN2(4,5)
    ACOS(12)
    ASIN(1)
    ATAN(10)
    SQRT(2)*SQRT(2)
    ATAN(12) + TRUNC(2.4) *ASIN(14.3) *ACOS(1.2)
    ATAN(.912)
    TRUNC(2.4)
    ASIN(0.705)
    ACOS(.12)
    ATAN(.912) + TRUNC(2.4) - ASIN(0.705) + ACOS(.12)
    MATH(3*9)
    ${GLOBAL(ULKOPREFIX)}9${x}
    512059${x}