See #18. Enable tests for CPP, Python, and SQL.

This commit is contained in:
Glavin Wiechert 2014-12-28 16:20:01 -04:00
parent 314c267d9b
commit e46001b48f
6 changed files with 49 additions and 17 deletions

View File

@ -15,6 +15,8 @@ before_install:
# Python language support
- brew install python
- pip install --upgrade autopep8
# SQL language support
- pip install --upgrade sqlparse
# Markdown language support
- brew install pandoc
# Java, C, C++, C#, Objective-C, D, Pawn, Vala

View File

@ -1,21 +1,32 @@
import math, sys;
import math
import sys
def example1():
####This is a long comment. This should be wrapped to fit within 72 characters.
some_tuple=( 1,2, 3,'a' );
some_variable={'long':'Long code lines should be wrapped within 79 characters.',
'other':[math.pi, 100,200,300,9876543210,'This is a long string that goes on'],
'more':{'inner':'This whole logical line should be wrapped.',some_tuple:[1,
20,300,40000,500000000,60000000000000000]}}
return (some_tuple, some_variable)
def example2(): return {'has_key() is deprecated':True}.has_key({'f':2}.has_key(''));
class Example3( object ):
def __init__ ( self, bar ):
#Comments should have a space after the hash.
if bar : bar+=1; bar=bar* bar ; return bar
else:
some_string = """
# This is a long comment. This should be wrapped to fit within 72 characters.
some_tuple = (1, 2, 3, 'a')
some_variable = {'long': 'Long code lines should be wrapped within 79 characters.',
'other': [math.pi, 100, 200, 300, 9876543210, 'This is a long string that goes on'],
'more': {'inner': 'This whole logical line should be wrapped.', some_tuple: [1,
20, 300, 40000, 500000000, 60000000000000000]}}
return (some_tuple, some_variable)
def example2():
return {'has_key() is deprecated': True}.has_key({'f': 2}.has_key(''))
class Example3(object):
def __init__(self, bar):
# Comments should have a space after the hash.
if bar:
bar += 1
bar = bar * bar
return bar
else:
some_string = """
Indentation in multiline strings should not be touched.
Only actual code should be reindented.
"""
return (sys.path, some_string)
return (sys.path, some_string)

View File

@ -1 +1,20 @@
SELECT ca.proj_id AS proj_id, ca.ca_name AS proj_name, ca.ca_date_start AS proj_start, ca.ca_date_end AS proj_end,(SELECT COUNT(*) FROM rotations r WHERE r.proj_id = proj_id AND r.r_status = 'R' GROUP BY r.proj_id) r_count, (SELECT count(*) FROM rotations r WHERE r.proj_id = proj_id AND r.channel_id = 24 ) r_rtb_count FROM projs ca, clients c, proj_auth caa WHERE ca.client_id = 12345 AND ca.client_id = c.client_id AND ca_type = 'zzz' AND c.agency_id = 0 AND ca.client_id = NVL( caa.client_id, ca.client_id ) AND proj_id = NVL( caa.proj_id, proj_id ) AND caa.contact_id = 7890
SELECT ca.proj_id AS proj_id, ca.ca_name AS proj_name, ca.ca_date_start AS proj_start, ca.ca_date_end AS proj_end,
(SELECT count(*)
FROM rotations r
WHERE r.proj_id = proj_id
AND r.r_status = 'R'
GROUP BY r.proj_id) r_count,
(SELECT count(*)
FROM rotations r
WHERE r.proj_id = proj_id
AND r.channel_id = 24) r_rtb_count
FROM projs ca,
clients c,
proj_auth caa
WHERE ca.client_id = 12345
AND ca.client_id = c.client_id
AND ca_type = 'zzz'
AND c.agency_id = 0
AND ca.client_id = nvl(caa.client_id, ca.client_id)
AND proj_id = nvl(caa.proj_id, proj_id)
AND caa.contact_id = 7890